mirror of
https://github.com/ansible-collections/community.mysql.git
synced 2025-08-22 05:51:45 -07:00
fix hash
This commit is contained in:
parent
2cb94ccf8d
commit
88f900461d
2 changed files with 3 additions and 4 deletions
|
@ -191,7 +191,7 @@ def user_add(cursor, user, host, host_all, password, encrypted,
|
|||
generated_hash_string = mysql_sha256_password_hash_hex(password=plugin_auth_string, salt=salt)
|
||||
else:
|
||||
module.fail_json(msg="salt not handled for %s authentication plugin" % plugin)
|
||||
query_with_args = "CREATE USER %s@%s IDENTIFIED WITH %s AS %s", (user, host, plugin, generated_hash_string)
|
||||
query_with_args = ("CREATE USER %s@%s IDENTIFIED WITH %s AS 0x" + generated_hash_string), (user, host, plugin)
|
||||
else:
|
||||
query_with_args = "CREATE USER %s@%s IDENTIFIED WITH %s BY %s", (user, host, plugin, plugin_auth_string)
|
||||
elif plugin:
|
||||
|
@ -372,7 +372,7 @@ def user_mod(cursor, user, host, host_all, password, encrypted,
|
|||
generated_hash_string = mysql_sha256_password_hash_hex(password=plugin_auth_string, salt=salt)
|
||||
else:
|
||||
module.fail_json(msg="salt not handled for %s authentication plugin" % plugin)
|
||||
query_with_args = "ALTER USER %s@%s IDENTIFIED WITH %s AS %s", (user, host, plugin, generated_hash_string)
|
||||
query_with_args = ("ALTER USER %s@%s IDENTIFIED WITH %s AS 0x" + generated_hash_string), (user, host, plugin)
|
||||
else:
|
||||
query_with_args = "ALTER USER %s@%s IDENTIFIED WITH %s BY %s", (user, host, plugin, plugin_auth_string)
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue