Filed from the second-wave repository audit (issue 70/100). See the audit summary for full category context.
- Location:
backend/src/controllers/user.controller.ts:94, 122 vs. backend/src/validators/user.validator.ts:11
- Problem:
getUser/getUserEvents re-declare /^G[A-Z2-7]{55}$/ inline instead of importing STELLAR_PUBLIC_KEY_REGEX, which already exists for exactly this purpose.
- Evidence: Duplicated regex literal versus an existing named export for the same pattern.
- Suggested implementation: Import and use
STELLAR_PUBLIC_KEY_REGEX from the validator module in both locations.
- Acceptance criteria: No inline Stellar-address regex literals remain outside the validator module.
- Difficulty: S
- Expected impact: Removes a small but real drift risk (e.g. a future format change updated in one place but not the other).
backend/src/controllers/user.controller.ts:94, 122vs.backend/src/validators/user.validator.ts:11getUser/getUserEventsre-declare/^G[A-Z2-7]{55}$/inline instead of importingSTELLAR_PUBLIC_KEY_REGEX, which already exists for exactly this purpose.STELLAR_PUBLIC_KEY_REGEXfrom the validator module in both locations.