mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 09:43:03 +00:00
SQL: treat all UID/ID values as numbers, not strings
Ensure we are not quoting these values in any of our SQL queries. Thanks-to: elij <elij.mx@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org> Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
This commit is contained in:
parent
fcda6671f3
commit
3609cf140e
4 changed files with 15 additions and 15 deletions
|
@ -58,8 +58,8 @@ if (isset($_GET['resetkey'], $_POST['email'], $_POST['password'], $_POST['confir
|
|||
$resetkey = new_sid();
|
||||
$dbh = db_connect();
|
||||
$q = "UPDATE Users
|
||||
SET ResetKey = '$resetkey'
|
||||
WHERE ID = '$uid'";
|
||||
SET ResetKey = '" . $resetkey . "'
|
||||
WHERE ID = " . $uid;
|
||||
db_query($q, $dbh);
|
||||
# Send email with confirmation link
|
||||
$body = __('A password reset request was submitted for the account '.
|
||||
|
|
|
@ -325,7 +325,7 @@ if ($uid):
|
|||
}
|
||||
|
||||
# Update package data
|
||||
$q = sprintf("UPDATE Packages SET ModifiedTS = UNIX_TIMESTAMP(), Name = '%s', Version = '%s-%s', License = '%s', Description = '%s', URL = '%s', OutOfDateTS = NULL, MaintainerUID = '%d' WHERE ID = %d",
|
||||
$q = sprintf("UPDATE Packages SET ModifiedTS = UNIX_TIMESTAMP(), Name = '%s', Version = '%s-%s', License = '%s', Description = '%s', URL = '%s', OutOfDateTS = NULL, MaintainerUID = %d WHERE ID = %d",
|
||||
mysql_real_escape_string($new_pkgbuild['pkgname']),
|
||||
mysql_real_escape_string($new_pkgbuild['pkgver']),
|
||||
mysql_real_escape_string($new_pkgbuild['pkgrel']),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue