mirror of
https://github.com/pbakaus/impeccable.git
synced 2026-09-15 15:46:30 +03:00
Pin the token expression in the manual-edit-stash source assertion
Review follow-up: the regex stopped at the literal ?token= and tolerated anything after it, so removing the encoded token value from the URL still passed. Requiring encodeURIComponent(TOKEN) right after the prefix makes the mutation fail. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
675656c18c
commit
60c860f022
@@ -42,7 +42,7 @@ describe('live-browser source contracts', () => {
|
||||
);
|
||||
assert.match(
|
||||
SOURCE,
|
||||
/fetch\('http:\/\/localhost:' \+ PORT \+ '\/manual-edit-stash\?token='[\s\S]{0,300}?pageUrl: location\.pathname[\s\S]{0,80}?element: extractContext\(contextElement\)[\s\S]{0,40}?ops,/,
|
||||
/fetch\('http:\/\/localhost:' \+ PORT \+ '\/manual-edit-stash\?token=' \+ encodeURIComponent\(TOKEN\)[\s\S]{0,300}?pageUrl: location\.pathname[\s\S]{0,80}?element: extractContext\(contextElement\)[\s\S]{0,40}?ops,/,
|
||||
'Save should stage edits through /manual-edit-stash with element context and ops',
|
||||
);
|
||||
assert.match(
|
||||
|
||||
Reference in New Issue
Block a user