You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix: Portfolio creation accepts arbitrary strings as userAddress — no Stellar address validation #63
In backend/src/api/validation.ts, createPortfolioSchema validates userAddress only as z.string().min(1). The codebase already has a working stellarAddressSchema (using the Stellar SDK's StrKey.isValidEd25519PublicKey) in the same file, but createPortfolioSchema does not use it.
This means any caller can create portfolios under arbitrary identifiers, which pollutes the database with unlinked records and could cause collisions if two different users happen to use the same string.
Proposed Fix
1. Use existing stellarAddressSchema
Change the userAddress field in createPortfolioSchema from z.string().min(1) to stellarAddressSchema.
2. Handle demo mode
The frontend falls back to "demo-user" when no wallet is connected. Options:
Add a separate demoAddress field for demo mode and validate userAddress only when in non-demo mode
Or require wallet connection before portfolio creation
3. Add validation tests
Test that invalid addresses are rejected and valid G... addresses are accepted.
I would like to resolve this issue. Here is my proposed execution plan:
Implementation: Trace the regression in grantFoxin/SentientFi causing fix: Portfolio creation accepts arbitrary strings as userAddress — no Stellar address validation and implement a targeted, minimal fix.
Testing & Verification: Add a reproduction test case to prevent any future regression.
Delivery: Ready to ship a thoroughly tested PR within 12–24 hours with passing CI.
I would love to take this on. My planned approach:
Trace the regression in grantFoxin/SentientFi causing fix: Portfolio creation accepts arbitrary strings as userAddress — no Stellar address validation and implement a targeted, minimal fix.
Add a reproduction test case to prevent any future regression.
Activity
waterWang commentedon Aug 23, 2026
I would like to work on this issue. Will update
createPortfolioSchemato usestellarAddressSchema, handle demo mode, and add validation tests.waterWang commentedon Aug 24, 2026
I have submitted PR #72 to address this issue. Changes:
shobhamerabacha-star commentedon Sep 10, 2026
Hey team,
I would like to resolve this issue. Here is my proposed execution plan:
grantFoxin/SentientFicausingfix: Portfolio creation accepts arbitrary strings as userAddress — no Stellar address validationand implement a targeted, minimal fix.Happy to pick this up today—please assign to me!
guptakumarranjeet150 commentedon Sep 13, 2026
Hello! I'd like to work on this issue.
I would love to take this on. My planned approach:
grantFoxin/SentientFicausingfix: Portfolio creation accepts arbitrary strings as userAddress — no Stellar address validationand implement a targeted, minimal fix.Happy to pick this up today—please assign to me!
rupesh-kumar-sah commentedon Oct 3, 2026
Hi,
I have experience with similar implementations and would like to take this on.
Solution overview:
Please assign this to me if the plan looks good. Thanks!
ranjeet150 commentedon Oct 3, 2026
Greetings,
I would like to work on this issue.
Technical outline:
I can deliver a clean, tested PR within 24 hours. Please assign!