Repository navigation
Tags
Tags
fix(security): enforce ownership checks on push tokens and email noti… …fications - Restrict `getPushToken`, `createPushToken`, `deletePushToken`, and `updateEmailNotifications` to the owning user or an admin - Add cross-user and supplier authorization tests in `backend/__tests__/user.test.ts`
fix(security): enforce agency ownership checks on property creation, … …property updates, and booking updates - Verify session user role and lock `agency` to the authenticated agency in `propertyController.create` and `propertyController.update` - Verify target property ownership and enforce `booking.agency` in `bookingController.update` - Add cross-agency regression tests in `backend/__tests__/property.test.ts` and `backend/__tests__/booking.test.ts`
fix(security): prevent NoSQL operator injection in /api/activate (GHS… …A-c686-3wqx-x82h) - Enforce strict string type and format validation on `userId`, `token`, and `password` in `userController.activate` before querying the database - Cast `userId` to `mongoose.Types.ObjectId` and `token` to `String` explicitly, and consume tokens atomically via `Token.findOneAndDelete` to prevent replay attacks - Add rate limiting to `/api/activate` and protect `DELETE /api/delete-tokens/:userId` with `authJwt.verifyToken` and ownership/admin checks - Prevent unauthenticated `user.active = false` account lockouts in `userController.resend` - Add Jest + Supertest security regression tests in `backend/__tests__/activate.test.ts`
PreviousNext