betterwithage Claude Opus 4.7 commited on
Commit
5e0b102
·
verified ·
1 Parent(s): 80dc42e

deploy(hf): sync szl-holdings/a11oy@main derived COPY set

Browse files

Reusable Dockerfile-COPY-derived deploy from szl-holdings/a11oy main.
Files: 1053 Pruned: 0
Derived from Dockerfile COPY sources (NO hand-maintained allowlist).

Signed-off-by: SZL Holdings <noreply@szlholdings.ai>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

Files changed (1) hide show
  1. web/verify-receipt.html +9 -2
web/verify-receipt.html CHANGED
@@ -282,10 +282,17 @@
282
  var q = new URLSearchParams(window.location.search);
283
  var receipt = q.get("receipt");
284
  var envelope = q.get("envelope");
285
- if(envelope){
 
 
 
 
 
 
 
286
  $("env").value = envelope;
287
  doVerify({envelope: envelope});
288
- } else if(receipt){
289
  $("rid").value = receipt;
290
  doVerify({receipt_id: receipt});
291
  }
 
282
  var q = new URLSearchParams(window.location.search);
283
  var receipt = q.get("receipt");
284
  var envelope = q.get("envelope");
285
+ // Validate the SHAPE of the URL-supplied values before they drive the
286
+ // auto-verify branch. The server does the real cryptographic verification;
287
+ // this is defence-in-depth so a malformed/oversized query param is never
288
+ // blindly re-submitted, and it takes the raw user-controlled value out of
289
+ // the security-relevant branch condition (CodeQL js/user-controlled-bypass).
290
+ var validEnvelope = typeof envelope === "string" && /^[A-Za-z0-9_\-]{1,8192}$/.test(envelope);
291
+ var validReceipt = typeof receipt === "string" && /^[A-Za-z0-9._:\-]{1,256}$/.test(receipt);
292
+ if(validEnvelope){
293
  $("env").value = envelope;
294
  doVerify({envelope: envelope});
295
+ } else if(validReceipt){
296
  $("rid").value = receipt;
297
  doVerify({receipt_id: receipt});
298
  }