Spaces:
Sleeping
Sleeping
Commit History
14 days ago
-
fix(security): close auth takeover, harden RLS, repair adoption and NGO flows
Auth - Never sign in or refresh on a shared Supabase client; use a throwaway client per call so the server cannot hold another user's session - reset-password now requires the recovery token and changes only that user's password; logout revokes only the caller's session - Add POST /api/auth/refresh; frontend refreshes once on 401 Database - Migration 15: block users changing their own role, ban state or NGO approval; hide private profile columns from anon/authenticated; make counter RPCs service-role only - getProfile returns public columns only Adoption and NGO onboarding - Cross-user writes (plant status, adopter garden row) go through the service role and their errors are checked; approval cannot double-adopt - NGO applicants can reach onboarding and their status while still adopters; approved NGOs editing details stay approved Smaller fixes - Like, bookmark and comment counters cannot drift - Credentials bypass the HTML sanitiser - Care tips use a current Gemini mode…55ffa7e
-
Merge branch 'main' into feat/209-plants-near-me
Shardul Chogale9c964a9 -
Merge branch 'main' into fix/204-map-bbox-pagination
Shardul Chogale2901169 -
feat(#209): add dedicated plants-near-me flow with radius slider
ankita012098eedd8d -
fix(#204): bbox-scoped map queries with result cap
ankita01209c3e1e0e -
Merge branch 'main' into feat/ngo-plant-register
Shardul Chogale36a2e92 -
feat(ngo): make the plant register a survival view
The register listed name, species and a photo, and nothing about whether the trees were alive. Knowing which trees are surviving is the NGO's job, and the page said nothing about it. Each row now carries its guardian, the age of the last growth report and the reported health, and the page opens on "Needs attention": trees whose guardians have gone quiet past the monthly rhythm they agreed to, and trees reported critical or dead. A banner counts the quiet ones, because silence is what losing a tree looks like in the data. Adds GET /api/ngo/plants for this, which returns the NGO's plants with their guardian and latest report in three queries no matter how many plants there are. The alternative in the client was one report request per plant. Two inventions removed, the same class as #275: the stock Unsplash photograph that stood in when the NGO had uploaded none, and "Common species" printed where the species was simply unknown. They now read "No photo" and "Species not recorded". Rem…04189d6 -
fix(db): renumber the geo migration to 14, and stop posts writing location
12 is reserved for the storage buckets in #189's set and 13 for the clustering RPC in #205, both of which are in flight; taking 12 here would have collided with #189 when it lands. The README says which numbers are spoken for and why. post.controller still wrote a raw POINT(lng lat) string into location, which is the drift this migration removes for plants. The trigger overwrites it on every insert anyway, so the line was misleading rather than harmful.dd39145
-
fix: sync location from latitude and longitude
ankita01209dff8169
-
fix(ci): make the backend gate real and repair broken keep-alive alerting
Shardul Chogale +1: Claude Opus 5Two defects found while auditing CI, both of which made a green build mean less than it looked. Backend lint was a decorative required check - `continue-on-error: true` meant the "Backend — lint" job passed whatever eslint reported, while the branch ruleset lists it as a REQUIRED status check. A required check that cannot fail protects nothing. - Cleared the two real errors so the gate can be switched on: the quotes error in scripts/cleanup-db.js via --fix, and the no-useless-assignment report on src/config/redis.js. - The redis one is a false positive and is annotated rather than "fixed": `let redisClient = null` is the defensive default for the catch path, so callers see null instead of undefined when `new Redis()` throws. The rule only sees the reassignment. This also corrects a guess in #236 that the warning might mean Redis was not wired up — it is wired up correctly. - `npm test --if-present` stays advisory: backend declares a test script but ships no tests, an…c9f39fe
-
fix: Add WebSocket polyfill for Supabase in Node 20
114d9ee -
security: resolve CodeQL scanning and Dependabot alerts
Mukta0170a0a13
-
chore(config): update admin and test adopter emails to shard.chogale1983@gmail.com and test_adopter@gmail.com, keep passwords same
Shardul Chogale603b587
-
feat(redis): implement distributed Redis rate limiting and multi-layer AI cache with offline fallbacks
Shardul Chogale0c56067
-
feat(edge): implement edge middleware geolocation routing, dynamic leaflet map fly-to, and CDN edge caching headers for plants/posts map endpoints
Shardul Chogale38dccff
-
security: secure Supabase functions, prevent Docker secrets leakage, and harden error handler (fixes #59)
Shardul Chogaleb63bc10 -
feat: enhance security with password validation, XSS middleware, role-based access restrictions, and updated environment configurations.
Shardul Chogale13c80ac
-
security: resolve key exposure, backend RLS bypasses, and script path traversals
Shardul Chogale- Untracked backend/env copy and flora-genius node_modules from git index - Added local and global gitignores and .dockerignores to prevent configuration leakage - Implemented per-request Supabase client context in backend using AsyncLocalStorage and dynamic Proxy to enforce RLS - Updated explicit administrative controllers to bypass RLS via supabaseServiceRole - Resolved 7 SecureCoder static scanner findings (path traversal & systemInstruction parameters)7e85d34
-
feat: proactive AI notifications (Smart Alerts) - closes #37
rahulcodes-java6808cac
-
refactor: convert double quotes to single quotes throughout seed scripts
Shardul Chogalea4d7990
-
fix: resolve map 400 error, add NGO darpan_id/questions, and polish auth UI
Shardul Chogale825c78a
-
Complete project handover: updated backend, frontend, and added flora-genius module
Shardul Chogalea6145bc
-
Build: Final production handover with seeded data, admin fixes, and clean documentation
shard-c671a9cd6
-
admin-commit
rahulcodes-java765b99c
-
## fix(map,plants): improve map rendering and adoption UI feedback
RishabhHatlunkar- Fix "AI Identify" navigation link in Navbar (pointed to wrong route) - Add PostGIS EWKB coordinate parsing to the map for proper marker rendering - Implement stable coordinate jitter to prevent markers from stacking perfectly - Enhance Plant Detail page with status-specific feedback (Pending/Adopted/Role-check) - Ensure "Apply to Adopt" button is only visible when applicable7c69d9c