mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-07-04 06:29:08 +02:00
2022-11-05 Fred Gleason <fredg@paravelsystems.com>
* Fixed a regression in rdadmin(1) that incorrectly handled changing a password to an empty value. Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
parent
4122764e9d
commit
c9c64757ae
@ -23613,3 +23613,6 @@
|
||||
2022-11-05 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Fixed a regression in rdcatch(1) that broke record and play-out
|
||||
metering.
|
||||
2022-11-05 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Fixed a regression in rdadmin(1) that incorrectly handled changing
|
||||
a password to an empty value.
|
||||
|
@ -147,7 +147,12 @@ QString RDUser::password() const
|
||||
void RDUser::setPassword(const QString &password)
|
||||
{
|
||||
user_password=password;
|
||||
if(password.isEmpty()) {
|
||||
SetRowNull("PASSWORD");
|
||||
}
|
||||
else {
|
||||
SetRow("PASSWORD",QString(password.toUtf8().toBase64()));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -831,3 +836,14 @@ void RDUser::SetRow(const QString ¶m,bool value) const
|
||||
{
|
||||
SetRow(param,RDYesNo(value));
|
||||
}
|
||||
|
||||
|
||||
void RDUser::SetRowNull(const QString ¶m) const
|
||||
{
|
||||
QString sql;
|
||||
|
||||
sql=QString("update `USERS` set `")+
|
||||
param+"`=NULL where "+
|
||||
"`LOGIN_NAME`='"+RDEscapeString(user_name)+"'";
|
||||
RDSqlQuery::apply(sql);
|
||||
}
|
||||
|
@ -118,6 +118,7 @@ class RDUser
|
||||
void SetRow(const QString ¶m,const QString &value) const;
|
||||
void SetRow(const QString ¶m,int value) const;
|
||||
void SetRow(const QString ¶m,bool value) const;
|
||||
void SetRowNull(const QString ¶m) const;
|
||||
QString user_name;
|
||||
QString user_password;
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user