Skip to content

Conversation

ghost
Copy link

@ghost ghost commented Jul 22, 2020

When not logged in, accessing any Tasks page results in an Internal Server Error. This is because $userId is NULL, and SettingsService only accepts strings for user ids. As the error occurs during dependency injection of PageController, automatic redirects to the login page do not work.
This PR makes SettingsService accept NULL using nullable types, so Nextcloud can properly redirect the user to the login screen.

Error in log:
error-log

Error on web page:
error-page

Signed-off-by: Christopher Zentgraf <git@the-zenti.de>
@codecov
Copy link

codecov bot commented Jul 22, 2020

Codecov Report

Merging #1138 into master will increase coverage by 2.26%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #1138      +/-   ##
==========================================
+ Coverage   25.56%   27.82%   +2.26%     
==========================================
  Files          40       48       +8     
  Lines        2496     2609     +113     
  Branches      494      494              
==========================================
+ Hits          638      726      +88     
- Misses       1718     1743      +25     
  Partials      140      140              

Copy link
Member

@raimund-schluessler raimund-schluessler left a comment

Choose a reason for hiding this comment

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

Thanks for the fix, looks good!

@raimund-schluessler raimund-schluessler merged commit 5fe9e54 into nextcloud:master Jul 22, 2020
@raimund-schluessler raimund-schluessler added this to the 0.13.3 milestone Jul 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant