mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
Allow for resetting the SSH public key
Use NULL instead of an empty string if the SSH public key field is left empty. Additionally, do not check for duplicate keys in that case. Fixes FS#45109. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
This commit is contained in:
parent
8c4428de5d
commit
86352459ab
1 changed files with 2 additions and 2 deletions
|
@ -203,7 +203,7 @@ function process_account_form($TYPE,$A,$U="",$T="",$S="",$E="",$P="",$C="",
|
||||||
"<strong>", htmlspecialchars($E,ENT_QUOTES), "</strong>");
|
"<strong>", htmlspecialchars($E,ENT_QUOTES), "</strong>");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!$error) {
|
if (!$error && !empty($PK)) {
|
||||||
/*
|
/*
|
||||||
* Check whether the SSH public key is available.
|
* Check whether the SSH public key is available.
|
||||||
* TODO: Fix race condition.
|
* TODO: Fix race condition.
|
||||||
|
@ -247,7 +247,7 @@ function process_account_form($TYPE,$A,$U="",$T="",$S="",$E="",$P="",$C="",
|
||||||
$L = $dbh->quote($L);
|
$L = $dbh->quote($L);
|
||||||
$I = $dbh->quote($I);
|
$I = $dbh->quote($I);
|
||||||
$K = $dbh->quote(str_replace(" ", "", $K));
|
$K = $dbh->quote(str_replace(" ", "", $K));
|
||||||
$PK = $dbh->quote($PK);
|
$PK = empty($PK) ? "NULL" : $dbh->quote($PK);
|
||||||
$q = "INSERT INTO Users (AccountTypeID, Suspended, ";
|
$q = "INSERT INTO Users (AccountTypeID, Suspended, ";
|
||||||
$q.= "InactivityTS, Username, Email, Passwd, Salt, ";
|
$q.= "InactivityTS, Username, Email, Passwd, Salt, ";
|
||||||
$q.= "RealName, LangPreference, IRCNick, PGPKey, ";
|
$q.= "RealName, LangPreference, IRCNick, PGPKey, ";
|
||||||
|
|
Loading…
Add table
Reference in a new issue