Skip to content

Fix algorithms called with missing parameters#806

Merged
mikewest merged 1 commit intow3c:mainfrom
antosart:wrong-arguments
Mar 9, 2026
Merged

Fix algorithms called with missing parameters#806
mikewest merged 1 commit intow3c:mainfrom
antosart:wrong-arguments

Conversation

@antosart
Copy link
Copy Markdown
Member

@antosart antosart commented Mar 9, 2026

This change adds missing parameters to the call sites of a few algorithms.


Preview | Diff

index.bs Outdated
returns "`Allowed`" when executed upon null,
"`navigation`" and |navigation request|'s <a for="request">current URL</a>,
"`navigation`", |navigation request|'s <a for="request">current URL</a>,
and |navigation request|'s <a for="request">current URL</a> [=url/path=],
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy/paste error? current URL is listed twice.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is missing a 's, but we need both the URL and the URL's path I believe (the URL's path in this case is the script being executed, and is used for checking hashes).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I looked again, but I'm more confused. :) I think this will bottom out in script-src-elem's inline check, which takes an Element, a type, a policy, and a source. I think you intend to add |policy| here, not to add a path. The current URL is the source, and that gets passed into https://w3c.github.io/webappsec-csp/#match-element-to-source-list in step 4.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry. You are of course right and I was wrong. I was confused because the number of arguments didn't match, but the problem was that we were not passing policy. While the current URL was just fine. Should be fixed now.

@mikewest
Copy link
Copy Markdown
Member

mikewest commented Mar 9, 2026

Thanks! LGTM.

@mikewest mikewest merged commit a20d8fb into w3c:main Mar 9, 2026
2 checks passed
github-actions bot added a commit that referenced this pull request Mar 9, 2026
SHA: a20d8fb
Reason: push, by mikewest

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.

2 participants