[aur-dev] [PATCH 1/4] Fix SQL query used for creating new accounts
Fixes a regression introduced in 608c483 (Add user set timezones, 2017-01-20). Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org> --- web/lib/acctfuncs.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/lib/acctfuncs.inc.php b/web/lib/acctfuncs.inc.php index d0a7ff9..5f7f1f4 100644 --- a/web/lib/acctfuncs.inc.php +++ b/web/lib/acctfuncs.inc.php @@ -292,7 +292,7 @@ function process_account_form($TYPE,$A,$U="",$T="",$S="",$E="",$H="",$P="",$C="" $q = "INSERT INTO Users (AccountTypeID, Suspended, "; $q.= "InactivityTS, Username, Email, Passwd , "; $q.= "RealName, LangPreference, Timezone, Homepage, IRCNick, PGPKey) "; - $q.= "VALUES (1, 0, 0, $U, $E, $P, $R, $L, $TZ "; + $q.= "VALUES (1, 0, 0, $U, $E, $P, $R, $L, $TZ, "; $q.= "$HP, $I, $K)"; $result = $dbh->exec($q); if (!$result) { -- 2.12.0
The pkgbuild_uri option was replaced by source_file_uri in 9df1bd5 (Add direct links to each source file, 2017-02-12). Change one remaining reference to pkgbuild_uri accordingly. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org> --- web/template/pkgbase_details.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/template/pkgbase_details.php b/web/template/pkgbase_details.php index e368872..de55da0 100644 --- a/web/template/pkgbase_details.php +++ b/web/template/pkgbase_details.php @@ -1,6 +1,6 @@ <?php -$pkgbuild_uri = sprintf(config_get('options', 'pkgbuild_uri'), urlencode($row['Name'])); +$pkgbuild_uri = sprintf(config_get('options', 'source_file_uri'), 'PKGBUILD', urlencode($row['Name'])); $log_uri = sprintf(config_get('options', 'log_uri'), urlencode($row['Name'])); $snapshot_uri = sprintf(config_get('options', 'snapshot_uri'), urlencode($row['Name'])); $git_clone_uri_anon = sprintf(config_get('options', 'git_clone_uri_anon'), htmlspecialchars($row['Name'])); -- 2.12.0
The $salt variable is no longer needed as of 29a4870 (Use bcrypt to hash passwords, 2017-02-24). Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org> --- web/lib/acctfuncs.inc.php | 1 - 1 file changed, 1 deletion(-) diff --git a/web/lib/acctfuncs.inc.php b/web/lib/acctfuncs.inc.php index 5f7f1f4..63ab4b4 100644 --- a/web/lib/acctfuncs.inc.php +++ b/web/lib/acctfuncs.inc.php @@ -282,7 +282,6 @@ function process_account_form($TYPE,$A,$U="",$T="",$S="",$E="",$H="",$P="",$C="" $U = $dbh->quote($U); $E = $dbh->quote($E); $P = $dbh->quote($P); - $salt = $dbh->quote($salt); $R = $dbh->quote($R); $L = $dbh->quote($L); $TZ = $dbh->quote($TZ); -- 2.12.0
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org> --- web/lib/acctfuncs.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/lib/acctfuncs.inc.php b/web/lib/acctfuncs.inc.php index 63ab4b4..a6eab27 100644 --- a/web/lib/acctfuncs.inc.php +++ b/web/lib/acctfuncs.inc.php @@ -244,7 +244,7 @@ function process_account_form($TYPE,$A,$U="",$T="",$S="",$E="",$H="",$P="",$C="" "<strong>", htmlspecialchars($E,ENT_QUOTES), "</strong>"); } } - if (!$error && count($ssh_keys) > 0) { + if (!$error && isset($ssh_keys) && count($ssh_keys) > 0) { /* * Check whether any of the SSH public keys is already in use. * TODO: Fix race condition. -- 2.12.0
participants (1)
-
Lukas Fleischer