-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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 #3743: Fix SHA and compare regex on route file [Critical] #3851
Fix #3743: Fix SHA and compare regex on route file [Critical] #3851
Conversation
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.
Breaking Fix
|
||
m.Get("/compare/:before([a-z0-9]{7,40})\\.\\.\\.:after([a-z0-9]{7,40})", repo.CompareDiff) | ||
m.Get("/compare/:before([a-z0-9]{40})\\.\\.\\.:after([a-z0-9]{40})", repo.CompareDiff) |
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.
And now I can't compare master...develop
anymore 😒
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.
are you sure ?
EDIT: just tested, it working!
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.
oh [a-z]
, I read it as [a-f]
😄
+1 |
is this also already fixed in gitea ? |
looks like it is: https://github.com/go-gitea/gitea/blob/master/cmd/web.go#L590 |
Thanks! |
Related to the issue #3743, this pull request fix the regex used on the route file for SHA and branches comparisons.
a b c d e f 0 1 2 3 4 5 6 7 8 9