Skip to content
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 validation error when a URL has credentials but no host #793

Merged
merged 2 commits into from
Sep 26, 2023

Conversation

karwa
Copy link
Contributor

@karwa karwa commented Sep 26, 2023

Since this branch requires that atSignSeen is true, we must have already emitted an invalid-credentials validation error and this emission must be a duplicate.

What this check is actually doing is confirming that the host is not empty before it begins parsing it, so host-missing is a more appropriate error to emit.

  • At least two implementers are interested (and none opposed):
  • Tests are written and can be reviewed and commented upon at:
  • Implementation bugs are filed:
    • Chromium: …
    • Gecko: …
    • WebKit: …
    • Deno: …
    • Node.js: …
  • MDN issue is filed: …

(See WHATWG Working Mode: Changes for more details.)


Preview | Diff

@karwa karwa closed this Sep 26, 2023
@karwa
Copy link
Contributor Author

karwa commented Sep 26, 2023

Sorry just wanted to verify it once again. I think this is correct.

@karwa karwa reopened this Sep 26, 2023
Copy link
Member

@annevk annevk left a comment

Choose a reason for hiding this comment

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

This is correct, but the validation error table will need updates as well. As invalid-credentials would no longer be a fatal error and the second example there would be better moved to host-missing.

@karwa
Copy link
Contributor Author

karwa commented Sep 26, 2023

@annevk Ah yes, okay - updated. I moved the example and replaced it with one that demonstrates credentials in a non-special scheme.

@annevk annevk merged commit 3e8cd02 into whatwg:main Sep 26, 2023
1 check passed
@karwa karwa deleted the fix-error-invalidcredentials branch September 26, 2023 11:06
karwa added a commit to karwa/whatwg-url that referenced this pull request Sep 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants