fix: improve root user password check logic in ServerSecurity#2149
fix: improve root user password check logic in ServerSecurity#2149ExtReMLapin wants to merge 2 commits intoArcadeData:mainfrom
Conversation
| } | ||
|
|
||
| if (users.isEmpty() || (users.containsKey("root") && users.get("root").getPassword() == null)) | ||
| if (users.isEmpty() || !users.containsKey("root") || (users.containsKey("root") && users.get("root").getPassword() == null)) |
There was a problem hiding this comment.
I mean we could even remove users.isEmpty()
|
Forgot to run the CI tests oopsie woopsie |
|
hi, so, AFAIU, in this way when I restart arcade passing a new rootPassword, the previous one will be overwritten. |
Only if the user root has been removed manually editing the jsonl users file, unlike this PR where just passing as arg on boot changes it If it sounds safer to you feel free to edit the PR to add this check. However I feel like if the attacker already got
I fear the changes from this PR doesn't introduce any security exploit. All it does is allowing to set root password if it's not set. |
|
Before merging, I need some hints on how to tests this.
Is it right? |
|
moreover, how is this related to #2059 ? |
|
This can be related but more like an alternative proposed here #2058 (comment)
As you said
|
|
@robfrank What's the status of this issue? |
|
I'm coming back to this. I don't think it is good. Suppose to provide users/groups configuration without the root user: with this PR it is not possible anymore. At the first start a new root user if created. @lvca WDYT? |
|
I agree, if somebody decides to remove the root user, it shouldn't be created automatically at the next restart, unless root is internally needed for some reason, but I can't think of anything right now. |
|
Closing this PR not merging it. The user must be able to remove "root" as user. |
as proposed there : #2058 (comment)
Issue is that is we have at least one user registered it will not try to recreate root because the current contition doesn't allow it
this pr fixes it
Thanks to Tom Krawczyk for helping us find this bug.