-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Crash in html.go found from fuzzing #13819
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
Comments
So this causes a panic which should be caught and an error page shown. Looking at the code: Lines 658 to 660 in c9effd5
To get a panic here the length of val at this point has to be only 1 and either equal to " or '. Thus a much simpler reproducible error is:
E.g. https://try.gitea.io/arandomer/pathological/raw/branch/master/Another.md https://try.gitea.io/arandomer/pathological/src/branch/master/Another.md Now it looks like as a result of the chi pr the panic catcher has been broken as that panic should have and would have been caught by macaron previously and hidden showing a 500... |
Lines 651-664 or simply 658 should probably just get a Len check on them - a similar panic would be possible with |
Mea culpa - I added this and totally missed that |
This is a bug report for a crash found with the PostProcess fuzzer from here.
The version of gitea is the the master branch downloaded with
git clone https://github.com/go-gitea/gitea
Stacktrace:
Input buffer:
or with ASCII characters:
The text was updated successfully, but these errors were encountered: