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: valid username in webhook URL matching regex #12203
Conversation
ecd6a31
to
91ceb4e
Compare
Codecov ReportBase: 47.45% // Head: 47.43% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## master #12203 +/- ##
==========================================
- Coverage 47.45% 47.43% -0.02%
==========================================
Files 246 246
Lines 41867 41825 -42
==========================================
- Hits 19866 19839 -27
+ Misses 20002 19990 -12
+ Partials 1999 1996 -3
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
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.
Seems reasonable to me at least 👍
This commit fixes incorrect regular expression used for URL matching. Expected behavior: valid user info part is matched => webhook is sent. Actual behavior: some valid user info is not matched, example: `ssh://user-name@example.com/org/repo` => webhook is not sent. Context: - [RFC 3986 3.2.1 - User Information](https://www.rfc-editor.org/rfc/rfc3986#section-3.2.1) - [Username validation regex in shadow Linux package](https://github.com/shadow-maint/shadow/blob/master/libmisc/chkname.c#L36) Signed-off-by: mdsjip <2284562+mdsjip@users.noreply.github.com>
This commit fixes incorrect regular expression used for URL matching. Expected behavior: valid user info part is matched => webhook is sent. Actual behavior: some valid user info is not matched, example: `ssh://user-name@example.com/org/repo` => webhook is not sent. Context: - [RFC 3986 3.2.1 - User Information](https://www.rfc-editor.org/rfc/rfc3986#section-3.2.1) - [Username validation regex in shadow Linux package](https://github.com/shadow-maint/shadow/blob/master/libmisc/chkname.c#L36) Signed-off-by: mdsjip <2284562+mdsjip@users.noreply.github.com>
This commit fixes incorrect regular expression used for URL matching. Expected behavior: valid user info part is matched => webhook is sent. Actual behavior: some valid user info is not matched, example: `ssh://user-name@example.com/org/repo` => webhook is not sent. Context: - [RFC 3986 3.2.1 - User Information](https://www.rfc-editor.org/rfc/rfc3986#section-3.2.1) - [Username validation regex in shadow Linux package](https://github.com/shadow-maint/shadow/blob/master/libmisc/chkname.c#L36) Signed-off-by: mdsjip <2284562+mdsjip@users.noreply.github.com>
This commit fixes incorrect regular expression used for URL matching. Expected behavior: valid user info part is matched => webhook is sent. Actual behavior: some valid user info is not matched, example: `ssh://user-name@example.com/org/repo` => webhook is not sent. Context: - [RFC 3986 3.2.1 - User Information](https://www.rfc-editor.org/rfc/rfc3986#section-3.2.1) - [Username validation regex in shadow Linux package](https://github.com/shadow-maint/shadow/blob/master/libmisc/chkname.c#L36) Signed-off-by: mdsjip <2284562+mdsjip@users.noreply.github.com>
Cherry-picked onto release-2.6 for 2.6.3, release-2.5 for 2.5.12, and release-2.4 for 2.4.24. |
Fixes #9055. This commit fixes incorrect regular expression used for URL matching.
Expected behavior: valid user info part is matched => webhook is sent.
Actual behavior: some valid user info is not matched, example:
ssh://user-name@example.com/org/repo
=> webhook is not sent.Context:
Related issues:
Note on DCO:
If the DCO action in the integration test fails, one or more of your commits are not signed off. Please click on the Details link next to the DCO action for instructions on how to resolve this.
Checklist: