Skip to content

[Bug]: Replace Unsafe Seed Code String Matching with Registry-Based VerificationΒ #461

@Tushar15769

Description

@Tushar15769

πŸ“Œ Description

The current implementation of SeedVerifier.jsx validates seed authenticity using simple substring matching instead of actual database-backed verification.

Any QR code or manually entered value containing specific keywords can incorrectly pass authentication checks, creating a serious security and trust issue for farmers relying on the verification system.

The current workflow lacks:

Backend verification
Seed registry validation
Batch authenticity checks
Expiry validation
Manufacturer verification

This creates a false sense of authenticity and makes the system vulnerable to counterfeit seed fraud.


πŸ” Steps to Reproduce

Open the Seed Verifier module
Enter or scan a code containing FS-AUTH
Submit the verification request
Observe the authentication result
Notice that the seed is marked authentic without registry validation


❗ Expected Behavior

The verifier should validate seed batches against a trusted registry or backend database before marking them as authentic.

The system should:

Verify batch IDs
Validate manufacturer details
Check certification status
Reject expired or invalid seed batches
Return proper verification responses from backend services


⚠️ Actual Behavior

Any string containing FS-AUTH is automatically marked as authentic without any real validation or registry lookup.

This allows counterfeit QR codes or manually crafted inputs to bypass verification checks.


πŸ“· Screenshots / Logs

N/A


πŸ’» Environment

  • Device: (Desktop/Mobile)
  • Browser: (Chrome/Firefox/etc.)
  • OS: (Windows/Linux/Mac)

πŸ“’ Contribution Guidelines

  • Comment "assign me" to work on this issue
  • Provide proper fix with explanation

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions