8000 Prevent panic when editing forked repos by API by zeripath · Pull Request #14960 · go-gitea/gitea · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Prevent panic when editing forked repos by API #14960

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

Merged
merged 2 commits into from
Mar 11, 2021

Conversation

zeripath
Copy link
Contributor

When editing forked repos using the API the BaseRepository needs to loaded
in order to check its visibility otherwise there will be NPE panic.

Fix #14956

Signed-off-by: Andrew Thornton art27@cantab.net

When editing forked repos using the API the BaseRepository needs to loaded
in order to check its visibility otherwise there will be NPE panic.

Fix go-gitea#14956

Signed-off-by: Andrew Thornton <art27@cantab.net>
@zeripath zeripath added type/bug modifies/api This PR adds API routes or modifies them backport/v1.13 labels Mar 11, 2021
@zeripath zeripath added this to the 1.14.0 milestone Mar 11, 2021
@GiteaBot GiteaBot added the lgtm/need 1 This PR needs approval from one additional maintainer to be merged. label Mar 11, 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 Mar 11, 2021
@6543 6543 merged commit 5705f72 into go-gitea:master Mar 11, 2021
6543 pushed a commit to 6543-forks/gitea that referenced this pull request Mar 11, 2021
When editing forked repos using the API the BaseRepository needs to loaded
in order to check its visibility otherwise there will be NPE panic.

Fix go-gitea#14956

Signed-off-by: Andrew Thornton <art27@cantab.net>
@6543
Copy link
Member
6543 commented Mar 11, 2021

Backport: #14963

@6543 6543 added the backport/done All backports for this PR have been created label Mar 11, 2021
@zeripath zeripath deleted the fix-14956-load-baserepo-in-forks branch March 11, 2021 18:13
lunny pushed a commit that referenced this pull request Mar 12, 2021
When editing forked repos using the API the BaseRepository needs to loaded
in order to check its visibility otherwise there will be NPE panic.

Fix #14956

Signed-off-by: Andrew Thornton <art27@cantab.net>

Co-authored-by: zeripath <art27@cantab.net>
@go-gitea go-gitea locked and limited conversation to collaborators May 13, 2021
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. modifies/api This PR adds API routes or modifies them type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error 500 on edit a forked repo with api
5 participants
0