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

URLPattern panic #13394

Closed
AaronO opened this issue Jan 17, 2022 · 3 comments
Closed

URLPattern panic #13394

AaronO opened this issue Jan 17, 2022 · 3 comments
Assignees
Labels
bug Something isn't working correctly

Comments

@AaronO
Copy link
Contributor

AaronO commented Jan 17, 2022

Minimal reproduction

new URLPattern({ pathname: '/:a.' })

Expected behaviour

Running the reproduction case in Chrome yields:

URLPattern {
  hash: "*"
  hostname: "*"
  password: "*"
  pathname: "/:a."
  port: "*"
  protocol: "*"
  search: "*"
  username: "*"
}

Cause

This happens because of an .unwrap() in our rust-urlpattern crate: https://github.com/denoland/rust-urlpattern/blob/fdb0bbb45613b346cb1bfef57c16fc8af97fa1ff/src/component.rs#L195

@AaronO AaronO added the bug Something isn't working correctly label Jan 17, 2022
@AaronO AaronO changed the title URLPatternic panic URLPattern panic Jan 17, 2022
@AaronO
Copy link
Contributor Author

AaronO commented Jan 17, 2022

Possibly an issue in the spec: whatwg/urlpattern#156

@AaronO
Copy link
Contributor Author

AaronO commented Jan 17, 2022

@bartlomieju
Copy link
Member

We are using urlpattern @ 0.1.5 so this issue can be now closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working correctly
Projects
None yet
Development

No branches or pull requests

3 participants