Closed DonGiovanni83 closed 4 months ago
Another issue is that it seems the change was persisted only today.
As far as I remember I didn't see a change in the ansible Task. The log output seems to confirm my suspition:
TASK [opnsense_manage : Get api key print] ***************************************************************************************************************************************************
ok: [fw02.cloud-staging.puzzle.ch] =>
msg:
changed: true
diff:
after:
system: ""
system/nextgid: '2000'
system/nextuid: '2015'
system/user: ""
before:
system: ""
system/nextgid: '2000'
system/nextuid: '2015'
system/user: ""
failed: false
generated_apikeys:
- key=...
- secret=...
Output ok: but: changed: true
Describe the bug When creating or updating a user password, we do not sanitize the unhashed password before hashing it. This results in the php error being written to the config instead of a valid hash. Therefore those users will not be able to log in anymore. To Reproduce Steps to reproduce the behavior:
Expected behavior The password input must be sanitized before it is passed to the PHP hash function.
Additional context The
plugins/module_utils/system_access_users_util.py:UserSet.set_user_password
function is the one that currently causes this issue.