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

Prevent NPE when checking repo units if the user is nil #19625

Merged

Conversation

zeripath
Copy link
Contributor

@zeripath zeripath commented May 5, 2022

CheckRepoUnitUser should tolerate nil users.

Fix #19613

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

CheckRepoUnitUser should tolerate nil users.

Fix go-gitea#19613

Signed-off-by: Andrew Thornton <art27@cantab.net>
@GiteaBot GiteaBot added the lgtm/need 1 This PR needs approval from one additional maintainer to be merged. label May 5, 2022
@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 May 6, 2022
@codecov-commenter
Copy link

Codecov Report

❗ No coverage uploaded for pull request base (main@4691e59). Click here to learn what that means.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main   #19625   +/-   ##
=======================================
  Coverage        ?   47.39%           
=======================================
  Files           ?      954           
  Lines           ?   132760           
  Branches        ?        0           
=======================================
  Hits            ?    62916           
  Misses          ?    62266           
  Partials        ?     7578           
Impacted Files Coverage Δ
models/repo.go 53.52% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4691e59...888aa09. Read the comment docs.

@wxiaoguang wxiaoguang merged commit a7f5268 into go-gitea:main May 6, 2022
zeripath added a commit to zeripath/gitea that referenced this pull request May 6, 2022
Backport go-gitea#19625

CheckRepoUnitUser should tolerate nil users.

Fix go-gitea#19613

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

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
@zeripath zeripath added the backport/done All backports for this PR have been created label May 6, 2022
@zeripath zeripath deleted the fix-19613-prevent-npe-on-nil-user branch May 6, 2022 08:21
wxiaoguang added a commit that referenced this pull request May 6, 2022
)

Backport #19625

CheckRepoUnitUser should tolerate nil users.

Fix #19613

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

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
zjjhot added a commit to zjjhot/gitea that referenced this pull request May 6, 2022
* giteaofficial/main:
  Simplify `IsVendor` (go-gitea#19626)
  Prevent NPE when checking repo units if the user is nil (go-gitea#19625)
  Skip duplicated layers. (go-gitea#19624)
  Add "Reference" section to Issue view sidebar (go-gitea#19609)
  GetFeeds must always discard actions with dangling repo_id (go-gitea#19598)
AbdulrhmnGhanem pushed a commit to kitspace/gitea that referenced this pull request Aug 24, 2022
CheckRepoUnitUser should tolerate nil users.

Fix go-gitea#19613

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

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
@go-gitea go-gitea locked and limited conversation to collaborators May 3, 2023
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.

Gitea 1.16.6: PANIC: runtime error: invalid memory address or nil pointer dereference
6 participants