-
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
User Id "0" issues #28406
Comments
I came across this because I was testing the case when the user id is a string of digits "123". That seems to work, and I guess there are installations out there that will use an integer as a user id (maybe a University that uses a student number directly as the user id? or...) I tried "0" and it has problems - which will be due to the pain of empty("0") === true in PHP and similar. Actually should "0" just be declared not a valid user id (reject it when adding a user)? |
should be fixed - if not too difficult. |
yeah, we need to find all of those places anyway... we're already trying to avoid such problems in new code but there is likely old code still doing the checks wrong... thank you PHP for |
#29198 requires usernames to be 3 or more chars. So that would "fix" (=workaround) this particular issue. |
Hey, this issue has been closed because the label |
Username cannot be "0" any more. So the particular issue reported here is avoided. Leaving closed. |
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. |
Steps to reproduce
Expected behaviour
The share panel opens and lets you share the file
Actual behaviour
An error, "Problem loading page, reloading in 5 seconds".
The sharing panel does not display.
Server configuration
Any I expect (was on current master on a dev VM)
Client configuration
Browser:
Firefox
Operating system:
Ubuntu
Logs
ownCloud log (data/owncloud.log)
Some code that checks the supplied username+password when accessing this area of the API is failing when supplied with "0" for the user id. (Other file operations like create/rename/delete are working)
There are places in lib/private/user/Session.php that do stuff like:
which will not do the expected code when the user is "0".
And possibly quite a few other places where the user id is used and checked.
The text was updated successfully, but these errors were encountered: