Skip to content

fix: price, Stellar address, Content-Disposition and text upload validation (#59 #60 #61 #62) - #140

Merged
victorisiguzoruzoma874 merged 4 commits into
SynapsVault:mainfrom
Freezyyy-arch:fix/freezyyy-issues-59-62
Oct 19, 2026
Merged

victorisiguzoruzoma874 merged 4 commits into
SynapsVault:mainfrom
Freezyyy-arch:fix/freezyyy-issues-59-62

Conversation

@Freezyyy-arch

Copy link
Copy Markdown
Contributor

Closes #59
Closes #60
Closes #61
Closes #62

Summary

ef5c4f4: fix: validate price fields at publish and set_price (#59)

  • New src/lib/priceValidation.ts (priceSchema) built on usdcToStroops: positive, at most 7 decimals.
  • Applied to price in the link/file publish, prepare price and set price schemas in src/schemas/requests.ts.
  • Test file added for edge cases.

d2e7b0b: fix: validate Stellar addresses in request schemas (#60)

  • New src/lib/stellarAddressValidation.ts using StrKey.isValidEd25519PublicKey.
  • Used for walletAddress (publisher register, link/file publish) and newCreator (ownership schemas).
  • Test file added.

ec85746: fix: escape Content-Disposition filename (#61)

  • New src/lib/contentDisposition.ts emits an ASCII fallback filename plus RFC 6266 filename*.
  • GET /resources/:id uses it; control characters are stripped.
  • Test covers quotes, semicolons, non-ASCII.

5381f23: fix: validate text/ uploads and send nosniff on downloads (#62)*

  • New src/lib/textUploadValidation.ts: requires valid UTF-8, no NUL bytes, no HTML/script markup; called from validateUpload.
  • Downloads now send X-Content-Type-Options: nosniff.
  • Test file added.

@vercel

vercel Bot commented Oct 19, 2026

Copy link
Copy Markdown

@Freezyyy-arch is attempting to deploy a commit to the work Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Oct 19, 2026

Copy link
Copy Markdown

@Freezyyy-arch Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@victorisiguzoruzoma874
victorisiguzoruzoma874 merged commit 105e66e into SynapsVault:main Oct 19, 2026
0 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment