Uh oh!
There was an error while loading. Please reload this page.
Fix users can't login external mount user entered credentials not set - #29923
Conversation
PVince81
commented
Nov 30, 2021
seems this breaks some FTP tests |
alacn1
commented
Nov 30, 2021
@PVince81 I didn't touch FTP, and FTP doesn't depend on this file. I think it's the master tip commit that is broken. Should I rebase to newer master and force push? |
8f5a152 to
ccd1e26Comparealacn1
commented
Dec 3, 2021
Rebased to master tip. |
Signed-off-by: Anderson Luiz Alves <alacn1@gmail.com>
ccd1e26 to
4e65441Comparealacn1
commented
Dec 3, 2021
fixed php-cs complaints. |
solracsf
commented
Dec 31, 2021
/backport to stable23 |
solracsf
commented
Dec 31, 2021
/backport to stable22 |
solracsf
commented
Dec 31, 2021
/backport to stable21 |
alacn1
commented
Dec 31, 2021
again, the failing checks is unrelated with the patch. |
PVince81
commented
Jan 3, 2022
I've restarted the static code checker, it seems it had an issue starting. once it passes we can merge this as everything else was green |
CarlSchwan
commented
Jan 14, 2022
Psalm issue is unrelated and will be fixed then rebasing :) |
Thanks for your first pull request and welcome to the community! Feel free to keep them coming! If you are looking for issues to tackle then have a look at this selection: https://github.com/nextcloud/server/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22 |
CarlSchwan
commented
Jan 14, 2022
/backport to stable22 |
CarlSchwan
commented
Jan 14, 2022
/backport to stable21 |
When using external mount with "Global credentials, user entered", users without it set won't be able to login.
This happens because BasicAuth requires username and password as string, but will be null when user didn't set it yet.
It happens because since the commit: 66781e7 update icewind/smb to 3.4.0
the file
apps/files_external/3rdparty/icewind/smb/src/BasicAuth.phpwas changed to use php 7.4 typed properties.BasicAuth with username as null throws TypeError:
apps/files_external/lib/Lib/Backend/SMB.phpTypeError is a subclass of Error, not a subclass of Exception, it won't catch it at FailedStorage:
apps/files_external/lib/Config/ConfigAdapter.phpThe proposed fix is to check if user and password is string instead of null, and throw InvalidArgumentException if it's not.
apps/files_external/lib/Lib/Backend/SMB.phpThis commit can be cherry-picked to master, stable22, stable21.
Fix#28229 .
Fix#26697 .
Stable22 PR #29638 .