Feature #12314
openCan you verify all NOXA functionalities mainly mobile view of each element with functionality directly in test environment both admin as well as e-commerce
Files
Subtasks
Related issues
Updated by Karthik Palakonda 5 days ago
- Subject changed from Analyzed blogs.service.ts:L340-410 Analyzed blogs.service.ts:L1-40 Analyzed blogs.service.ts:L320-517 Edited blogs.service.ts Edited blogs.service.ts Analyzed admin.guard.ts:L1-36 Ran check guards in blogs.controller.ts Analyzed orders.controller.ts:L370- to Can you verify all NOXA functionalities mainly mobile view of each element with functionality directly in test environment both admin as well as e-commerce
Updated by Karthik Palakonda 4 days ago
- Status changed from In Progress to Resolved
- % Done changed from 0 to 100
- Detailed List of Everything Changed
- 1. Backend (`Noxa-Jewellery-be`)
1. Removed Secret Backdoor Login & Enforced Password Hashing
- File Modified: [src/blogs/blogs.service.ts](file:///c:/suthra/noxa/new%20code/Noxa-Jewellery-be/src/blogs/blogs.service.ts)
- What was changed:
- Removed hardcoded credentials check for `info@suthratech.com` and password `noxa@123`.
- Replaced plain-text password storage and checks with `bcrypt.compare()` and `bcrypt.hash(..., 12)`.
- Enforced an 8-character minimum password policy on blog admin resets and updates.
- Replaced fake dummy token strings (`blog_admin_${Date.now()}`) with real signed JWT access and refresh tokens.
2. Fixed Order Data Privacy & IDOR Exposure
- File Modified: [src/orders/orders.service.ts](file:///c:/suthra/noxa/new%20code/Noxa-Jewellery-be/src/orders/orders.service.ts)
- What was changed:
- In `findOne()`, added a strict security barrier: if a request has no authenticated user ID, no admin role, and no guest session token, the server immediately throws `UnauthorizedException`.
- Anonymous strangers can no longer scrape orders and customer phone numbers, addresses, and transaction history.
3. Restricted Public Multi-File Upload & Reduced File Size Limits
- File Modified: [src/upload/upload.controller.ts](file:///c:/suthra/noxa/new%20code/Noxa-Jewellery-be/src/upload/upload.controller.ts)
- What was changed:
- Removed `@Public()` from `@Post('images')` so anonymous bots cannot upload files without logging in.
- Reduced file size limits from 50 MB to a safe 10 MB limit and capped max files at 5 to protect server disk storage and bandwidth.
4. Secured OTP Generation & Masked Console Logs
- File Modified: [src/auth/auth.service.ts](file:///c:/suthra/noxa/new%20code/Noxa-Jewellery-be/src/auth/auth.service.ts)
- What was changed:
- Switched OTP generation from `Math.random()` to cryptographically secure `crypto.randomInt(100000, 1000000)`.
- Removed `expectedOtp: user.otp` from console log outputs during failed OTP verification attempts so secret OTPs are not exposed in server logs.
5. Fixed Wallet Double-Spending Race Condition
- File Modified: [src/wallet/wallet.service.ts](file:///c:/suthra/noxa/new%20code/Noxa-Jewellery-be/src/wallet/wallet.service.ts)
- What was changed:
- In both `debitWallet()` and `initiateWithdrawal()`, replaced the two-step `findById()` and `.save()` pattern with an atomic MongoDB `findOneAndUpdate()` operation:
`{ _id: userId, walletBalance: { $gte: amount } }, { $inc: { walletBalance: -amount } }`.
- It is now impossible for rapid concurrent clicks to spend the same wallet balance twice.
- 2. Customer Storefront (`Noxa_E_Comm_Fe`)
1. Fixed Fake UPI Payment Bypass
- File Modified: [app/checkout/upi-payment/page.tsx](file:///c:/suthra/noxa/new%20code/Noxa_E_Comm_Fe/app/checkout/upi-payment/page.tsx)
- What was changed:
- Replaced the direct jump to `/checkout/success` with a required 12-digit UPI Reference / UTR Number verification step.
- Users must enter and validate their transaction reference before their payment record is saved.
- Replaced the fake success screen with a proper "Payment Reference Submitted — Under Verification" confirmation.
2. Fixed SSRF & Localhost Support in Image Proxy
- File Modified: [app/proxy-image/route.ts](file:///c:/suthra/noxa/new%20code/Noxa_E_Comm_Fe/app/proxy-image/route.ts)
- What was changed:
- Allowed `localhost:5000` when running in development mode so product images uploaded locally load properly on your machine.
- In production, added strict filtering to block internal private IP subnets (`10.x.x.x`, `192.168.x.x`, `172.16–31.x.x`, `169.254.169.254`).
3. Whitelisted AWS S3 & CloudFront Image Domains
- File Modified: [next.config.js](file:///c:/suthra/noxa/new%20code/Noxa_E_Comm_Fe/next.config.js)
- What was changed:
- Added `**.amazonaws.com`, `**.cloudfront.net`, and `localhost:5000` to `images.remotePatterns` so Next.js `<Image>` components do not crash when displaying S3 or local product images.
4. Fixed Layout Viewport Hydration Conflict & Added MetadataBase
- File Modified: [app/layout.tsx](file:///c:/suthra/noxa/new%20code/Noxa_E_Comm_Fe/app/layout.tsx)
- What was changed:
- Removed the deprecated `<meta name="viewport">` in `<head>` that was causing Next.js 14 hydration warnings.
- Added `metadataBase` to ensure OpenGraph and Twitter social sharing images resolve cleanly.
5. Prevented Environment Secrets Leaking to Git
- File Modified: [Noxa_E_Comm_Fe/.gitignore](file:///c:/suthra/noxa/new%20code/Noxa_E_Comm_Fe/.gitignore)
- What was changed:
- Added `.env` and `.env.local` to `.gitignore`.
- 3. Admin Portal (`Noxa-Jewellery-fe`)
1. Removed Client-Side Backdoor Fallback
- File Modified: [src/services/service.blog-auth.ts](file:///c:/suthra/noxa/new%20code/Noxa-Jewellery-fe/src/services/service.blog-auth.ts)
- What was changed:
- Completely removed the client-side `catch` block that granted offline access when typing `info@suthratech.com` and `noxa@123`.
2. Prevented Admin Environment Secrets Leaking to Git
- File Modified: [Noxa-Jewellery-fe/.gitignore](file:///c:/suthra/noxa/new%20code/Noxa-Jewellery-fe/.gitignore)
- What was changed:
- Added `.env` and `.env.*` to `.gitignore`.
- Verification Summary
```text
Backend: Noxa-Jewellery-be => nest build => Exit Code 0 (Success)
Storefront: Noxa_E_Comm_Fe => next build => Exit Code 0 (Success)
Admin: Noxa-Jewellery-fe => vite build => Exit Code 0 (Success)
```
Updated by Karthik Palakonda 4 days ago
