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

Make ParsePatch more robust #17573

Merged
merged 3 commits into from
Nov 7, 2021
Merged

Conversation

Gusted
Copy link
Contributor

@Gusted Gusted commented Nov 6, 2021

  • Handle some possible but non-likely edge-cases of ParsePatch whereby
    it was possible that it could crash.
  • Tests are added and were the only 2 cases I could find.

- Handle some possible but non-likely edge-cases of ParsePatch whereby
it was possible that it could crash.
- Tests are added and were the only 2 cases I could find.
Copy link
Contributor

@zeripath zeripath left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

apologies for the miscount

@GiteaBot GiteaBot added the lgtm/need 1 This PR needs approval from one additional maintainer to be merged. label Nov 6, 2021
@Gusted
Copy link
Contributor Author

Gusted commented Nov 6, 2021

apologies for the miscount

What miscount?

@zeripath
Copy link
Contributor

zeripath commented Nov 6, 2021

I am responsible for the original miscount of characters that leads to this patch

@zeripath zeripath added this to the 1.16.0 milestone Nov 6, 2021
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Nov 7, 2021
@Gusted
Copy link
Contributor Author

Gusted commented Nov 7, 2021

I am responsible for the original miscount of characters that leads to this patch

Ah got it, no worries. It was only after plugging in some values to see how it handled "ambitious" values it panicked, otherwise I wouldn't have seen it as well.

@techknowlogick techknowlogick merged commit 30515f2 into go-gitea:main Nov 7, 2021
@techknowlogick
Copy link
Member

@Gusted thanks for this PR (and all the other ones recently), could you send this as a backport to 1.15.x?

Also, are you on our discord? I have a question I'd like to ask.

Gusted pushed a commit to Gusted/gitea that referenced this pull request Nov 7, 2021
@Gusted Gusted deleted the parse-patch branch November 7, 2021 18:29
@Gusted
Copy link
Contributor Author

Gusted commented Nov 7, 2021

@Gusted thanks for this PR (and all the other ones recently),

Happy to help!

could you send this as a backport to 1.15.x?

#17580

Also, are you on our discord? I have a question I'd like to ask.

I am on the Gitea discord server. Gusted#3726

lunny pushed a commit that referenced this pull request Nov 8, 2021
@zeripath zeripath added the backport/done All backports for this PR have been created label Nov 8, 2021
Chianina pushed a commit to Chianina/gitea that referenced this pull request Mar 28, 2022
@go-gitea go-gitea locked and limited conversation to collaborators Apr 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport/done All backports for this PR have been created lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants