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

storage/url: add nil check for URL.filterRegex in URL.Match #511

Merged
merged 2 commits into from
Sep 16, 2022
Merged

storage/url: add nil check for URL.filterRegex in URL.Match #511

merged 2 commits into from
Sep 16, 2022

Conversation

kucukaslan
Copy link
Contributor

URL.Match method assumes that URL.filterRegex is not nil and used it without check. But if the URL was created with raw option or was created with type literal then it might be nil. So if Match was called for such URLs then it panics.

ps. It occured in an old variants of autocompletion PR. But that part of the code was changed now, so we won't include this change there.

@kucukaslan kucukaslan requested a review from a team as a code owner September 13, 2022 11:43
@kucukaslan kucukaslan requested review from igungor and aykutfarsak and removed request for a team September 13, 2022 11:43
@sonmezonur sonmezonur self-requested a review September 16, 2022 12:01
@sonmezonur sonmezonur merged commit 22592e5 into peak:master Sep 16, 2022
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.

3 participants