-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
[stable10] Check the return value of getUserSession before using it #30432
Conversation
This is a backport of PR #30418 |
sure. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
@ownclouders rebase |
Hey! I'm GitMate.io! This pull request is being rebased automatically. Please DO NOT push while rebase is in progress or your changes would be lost permanently |
Automated rebase with GitMate.io was successful! 🎉 |
I tried a rebase to trigger CI again. It does nothing because there are no new commits in I luv CI ;) |
Checking if the value returned by getUserSession and getUser is null or not before using it. Signed-off-by: Sujith H <sharidasan@owncloud.com>
7d508d4
to
4d9146a
Compare
Codecov Report
@@ Coverage Diff @@
## stable10 #30432 +/- ##
==============================================
+ Coverage 61.19% 61.2% +<.01%
- Complexity 18088 18092 +4
==============================================
Files 1068 1068
Lines 60089 60093 +4
==============================================
+ Hits 36774 36780 +6
+ Misses 23315 23313 -2
Continue to review full report at Codecov.
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Checking if the value returned by getUserSession
and getUser is null or not before using it.
Signed-off-by: Sujith H sharidasan@owncloud.com
Description
There were situations where userSession was directly calling getUser which returned null and the return value was never checked. Another case was getUserSession was returning null. Hence getUser was called on null. This caused breaking the code flow under certain conditions. This change is to fix the assumptions made.
Related Issue
#30335
#30416
Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist: