-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Error 500 on specific commits replacing backslash by slash #12546
Comments
zeripath
added a commit
to zeripath/gitea
that referenced
this issue
Aug 21, 2020
services/gitdiff/gitdiff.go whereby there it assumed that the path would always be quoted on both sides This PR simplifies the code here and uses fmt.Fscanf to parse the strings as necessary. Fix go-gitea#12546 Signed-off-by: Andrew Thornton <[email protected]>
zeripath
added a commit
that referenced
this issue
Aug 22, 2020
* Fix diff path unquoting services/gitdiff/gitdiff.go whereby there it assumed that the path would always be quoted on both sides This PR simplifies the code here and uses fmt.Fscanf to parse the strings as necessary. Fix #12546 Signed-off-by: Andrew Thornton <[email protected]> * Add testcase as per @mrsdizzie Signed-off-by: Andrew Thornton <[email protected]>
zeripath
added a commit
to zeripath/gitea
that referenced
this issue
Aug 23, 2020
Backport go-gitea#12554 * Fix diff path unquoting services/gitdiff/gitdiff.go whereby there it assumed that the path would always be quoted on both sides This PR simplifies the code here and uses fmt.Fscanf to parse the strings as necessary. Fix go-gitea#12546 Signed-off-by: Andrew Thornton <[email protected]> * Add testcase as per @mrsdizzie Signed-off-by: Andrew Thornton <[email protected]>
lafriks
pushed a commit
that referenced
this issue
Aug 23, 2020
Backport #12554 * Fix diff path unquoting services/gitdiff/gitdiff.go whereby there it assumed that the path would always be quoted on both sides This PR simplifies the code here and uses fmt.Fscanf to parse the strings as necessary. Fix #12546 Signed-off-by: Andrew Thornton <[email protected]> * Add testcase as per @mrsdizzie Signed-off-by: Andrew Thornton <[email protected]>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
[x]
):Description
I'm getting a reproductible 500 error when Gitea tries to show and parses a certain type of commit.
The process I found to reproduce this error is this one:
I traced back the error to this part of code in my version of Gitea, in the file "services\gitdiff\gitdiff.go" :
From what I understand of the code involved in the error, it seems there is a problem when a diff file contains multiples "types" of "diff --git " lines (with and without doubles quotes), as the git diff of the commit replacing the backslash by a slash which brings out the error contains both :
Side note : After this bug occurs, pull requests doesn't works anymore on my gitea for the repository containing the commit, between the dev branch (containing the offending commit) and the master branch. I have not been able to reproduce it on try.gitea.io, but I guess it is a side effect ?
The text was updated successfully, but these errors were encountered: