Repository navigation
fix(sécurité) : identifiants validés avant tout appel (0.7.1) - #15
Merged
Merged
Conversation
Un identifiant mis dans un chemin d'URL doit correspondre à ^[A-Za-z0-9_-]{1,128}$ ; sinon
invalid_request (statut 0, non rejouable), sans appel et sans citer la valeur. Avant,
get_payment("../balance") partait en /v1/payments/..%2Fbalance avec la clé du marchand.
Routes toutes faites : identifiant de paiement hors motif → 404 payment_not_found,
orderId hors motif → 404 order_not_found, sans appel.
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.
Un identifiant mis dans un chemin d'URL (
get_payment,cancel_payment,refund,record_external_refund,get_refund,simulate_test_payment, sync et async) doit correspondre à^[A-Za-z0-9_-]{1,128}$. Sinon :invalid_request(statut 0, non rejouable), aucun appel, message sans la valeur reçue.Avant,
get_payment("../balance")partait enGET /v1/payments/..%2Fbalanceavec la clé du marchand : un proxy qui décode%2Fpuis normalise le chemin l'enverrait vers/v1/balance.Routes toutes faites : identifiant de paiement hors motif → 404
payment_not_found,orderIdhors motif → 404order_not_found, sans appel. Contrat partagé inchangé (31 cas, verts).Tests :
../balance,..,.,a/b,a%2Fb, chaîne vide,pay 1, retour à la ligne final, 129 caractères, non-chaîne → refusés sans appel ;pay_1, UUID, 128 caractères → partent tels quels.