Skip to content

fix: point builds at api.micopay.app and close ramp order IDOR - #361

Merged
ericmt-98 merged 2 commits into
mainfrom
fix/aws-endpoint-and-ramp-idor
Aug 25, 2026
Merged

fix: point builds at api.micopay.app and close ramp order IDOR#361
ericmt-98 merged 2 commits into
mainfrom
fix/aws-endpoint-and-ramp-idor

Conversation

@ericmt-98

Copy link
Copy Markdown
Collaborator

Summary

Extracts two independent, already-verified fixes from the stalled #344 (62 files, CONFLICTING, open since Jul 27) so they can land on their own:

  • Point mobile builds at api.micopay.app (AWS) instead of the Render backend, which is being shut down. Left a note in .env.mainnet that the AWS domain currently runs STELLAR_NETWORK=TESTNET, so the "mainnet" build does not move real funds yet.
  • Close an IDOR on GET /defi/ramp/order/:orderId and its regenerate_tx path: any authenticated user could read another user's ramp order by guessing/enumerating orderId. Adds a ramp_orders ownership table populated at order creation and checked on both routes (403 on mismatch). Fail-open for orders created before the migration (no ownership row -> allowed, with a warning log) so in-flight orders are not broken.

Both commits (8108aeb, 34a4b23) were cherry-picked cleanly onto current origin/main in an isolated worktree.

Test plan

  • grep VITE_API_URL micopay/frontend/.env.testnet -> https://api.micopay.app
  • cd micopay/backend && npm ci && npm run build -> passes with no errors
  • CI on this PR

ericmt-98 and others added 2 commits August 25, 2026 12:21
Render se esta apagando; los dos builds pasan a api.micopay.app.

Aviso importante dejado en .env.mainnet: ese dominio corre hoy con
STELLAR_NETWORK=TESTNET, asi que el build "mainnet" no mueve fondos
reales todavia. Hasta que exista un backend en modo MAINNET, sigue
siendo un build de prueba.

VITE_ENABLE_DEFI_TRADING=true solo en testnet (finding B2: ese camino no
mueve fondos reales aun); queda sin poner en mainnet/production.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
GET /defi/ramp/order/:orderId y regenerate_tx devolvian el status de la
orden de cualquiera con solo tener el orderId. Ver el finding
"/defi/ramp/order/:orderId sin check de pertenencia" en
AUDIT_MOBILE_MAINNET.md.

Nueva tabla ramp_orders (order_id, user_id) que registra al dueno al
crear la orden y se valida en ambas rutas (403 si no coincide).
Fail-open para ordenes anteriores a la migracion (sin fila de ownership
se permite y se loguea warning) para no romper ordenes en curso.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@ericmt-98
ericmt-98 merged commit 006195d into main Aug 25, 2026
2 checks passed
@ericmt-98
ericmt-98 deleted the fix/aws-endpoint-and-ramp-idor branch August 25, 2026 19:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant