Skip to content

fix: critical security vulnerability in wallet authentication and add…#194

Merged
Nitya-003 merged 1 commit intoNitya-003:mainfrom
navin-oss:fix/controller-bugs
Mar 8, 2026
Merged

fix: critical security vulnerability in wallet authentication and add…#194
Nitya-003 merged 1 commit intoNitya-003:mainfrom
navin-oss:fix/controller-bugs

Conversation

@navin-oss
Copy link
Contributor

  • Fix nonce validation in walletLogin and walletRegister to prevent replay attacks
    • Always require stored nonce instead of falling back to constant string
    • Return 401 error if no nonce exists for the address
  • Add missing controller functions to batchController.js:
    • createBatch - handles batch creation with transaction support
    • getBatch - retrieves single batch by ID
    • getAllBatches - alias for getBatches (consistency)
    • updateBatch - handles batch updates with stage transitions
    • recallBatch - admin-only batch recall functionality
  • These functions prevent future import errors if routes are extracted from server.js

… missing batch controller functions

- Fix nonce validation in walletLogin and walletRegister to prevent replay attacks
  * Always require stored nonce instead of falling back to constant string
  * Return 401 error if no nonce exists for the address
- Add missing controller functions to batchController.js:
  * createBatch - handles batch creation with transaction support
  * getBatch - retrieves single batch by ID
  * getAllBatches - alias for getBatches (consistency)
  * updateBatch - handles batch updates with stage transitions
  * recallBatch - admin-only batch recall functionality
- These functions prevent future import errors if routes are extracted from server.js
@netlify
Copy link

netlify bot commented Mar 8, 2026

Deploy Preview for roaring-ganache-c7465f failed. Why did it fail? →

Name Link
🔨 Latest commit a6cbb22
🔍 Latest deploy log https://app.netlify.com/projects/roaring-ganache-c7465f/deploys/69ad714c8485050008951750

@Nitya-003 Nitya-003 merged commit ca021da into Nitya-003:main Mar 8, 2026
0 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

apertre3.0 bug Something isn't working Medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants