-
Notifications
You must be signed in to change notification settings - Fork 547
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix formdata arg validation #3529
Conversation
name = webidl.converters.USVString(name) | ||
|
||
if (arguments.length === 3 || value instanceof Blob) { | ||
value = webidl.converters.Blob(value, prefix, 'value') | ||
|
||
if (filename !== undefined) { | ||
filename = webidl.converters.USVString(filename) | ||
} | ||
} else { | ||
value = webidl.converters.USVString(value) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cant this be at line 140?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No. The webidl stuff occurs before the steps, but the step is also not needed because js doesn't have method overrides (hence the weird webidl here).
The set(name, value) and set(name, blobValue, filename) method steps are:
The first step is telling us to set value to "blobValue" if there were 3 arguments passed, otherwise do nothing. "value" is only ever "value" here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
The backport to
To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-v6.x v6.x
# Navigate to the new working tree
cd .worktrees/backport-v6.x
# Create a new branch
git switch --create backport-3529-to-v6.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 e0714063deb24f4887b00e0b90060ac71190b273
# Push it to GitHub
git push --set-upstream origin backport-3529-to-v6.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-v6.x Then, create a pull request where the |
@KhafraDev |
I painfully found out that the wpts are not extensive