Skip to content

avoid strict splitting in parseMetada to allow base64url#150

Open
Uzlopak wants to merge 1 commit into
w3c:mainfrom
Uzlopak:base64url
Open

avoid strict splitting in parseMetada to allow base64url#150
Uzlopak wants to merge 1 commit into
w3c:mainfrom
Uzlopak:base64url

Conversation

@Uzlopak
Copy link
Copy Markdown
Contributor

@Uzlopak Uzlopak commented Jul 9, 2025

We should do a strict split of the algorithm-expression, but only split it on the first occurence of the dash character.

base64urls` uses the dash character too, so if we want to allow base64url we cant do strict splitting.


Preview | Diff

@mozfreddyb
Copy link
Copy Markdown
Collaborator

We should make sure the feature is universally understood in all engines by adding tests to wpt before we move forward here. Would you be interested in doing so?

@Uzlopak
Copy link
Copy Markdown
Contributor Author

Uzlopak commented Jul 9, 2025

You mean adding tests to the wpt to ensure that all the browsers implemented also base64url?

@mozfreddyb
Copy link
Copy Markdown
Collaborator

My thinking is that I don't want the spec to enshrine something in writing that is not realistically doable because browsers were more liberal and web pages may already rely on this behavior.

There is a wide variant of what a browser could do and I don't want us to assume.
There should be tests for the various encoding formats (base64, base64, liberal/missing padding, extra trailing dashes).

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