fix: point builds at api.micopay.app and close ramp order IDOR - #361
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
api.micopay.app(AWS) instead of the Render backend, which is being shut down. Left a note in.env.mainnetthat the AWS domain currently runsSTELLAR_NETWORK=TESTNET, so the "mainnet" build does not move real funds yet.GET /defi/ramp/order/:orderIdand itsregenerate_txpath: any authenticated user could read another user's ramp order by guessing/enumeratingorderId. Adds aramp_ordersownership 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 currentorigin/mainin an isolated worktree.Test plan
grep VITE_API_URL micopay/frontend/.env.testnet->https://api.micopay.appcd micopay/backend && npm ci && npm run build-> passes with no errors