mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
Store last login address as plain text
Directly store the information contained in $_SERVER['REMOTE_ADDR'] instead of using ip2long() which does not support IPv6 addresses. Note that the LastLoginIPAddress field is designed to be used by the administrator on rare occasions only (e.g. to fight spam) and is not displayed anywhere. Fixes FS#48557. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
This commit is contained in:
parent
761952d424
commit
32c8d0c3f8
3 changed files with 8 additions and 3 deletions
|
@ -554,8 +554,8 @@ function try_login() {
|
|||
}
|
||||
|
||||
$q = "UPDATE Users SET LastLogin = UNIX_TIMESTAMP(), ";
|
||||
$q.= "LastLoginIPAddress = " . $dbh->quote(ip2long($_SERVER['REMOTE_ADDR'])) . " ";
|
||||
$q.= "WHERE ID = '$userID'";
|
||||
$q.= "LastLoginIPAddress = " . $dbh->quote($_SERVER['REMOTE_ADDR']) . " ";
|
||||
$q.= "WHERE ID = $userID";
|
||||
$dbh->exec($q);
|
||||
|
||||
/* Set the SID cookie. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue