25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-12-22 17:28:25 +01:00

Reset scram fields when setting plain password in ejabberd_auth_sql

Setting scram password, then disabling scram and setting plain password
again, will make us think we are still using scramed password and crash
when trying to process it as such. This makes sure that when set plain
password we don't leave parts from old scram password.
This commit is contained in:
Paweł Chmielowski 2023-08-03 13:06:01 +02:00
parent 25411333da
commit 20a8654be2

View File

@ -161,7 +161,10 @@ set_password_t(LUser, LServer, Password) ->
"users",
["!username=%(LUser)s",
"!server_host=%(LServer)s",
"password=%(Password)s"]).
"password=%(Password)s",
"serverkey=''",
"salt=''",
"iterationcount=0"]).
get_password_scram(LServer, LUser) ->
ejabberd_sql:sql_query(