mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-13 05:15:55 +00:00
force cast profile id to integer when assigning to session variable
This commit is contained in:
@@ -509,7 +509,7 @@ class Handler_Public extends Handler {
|
||||
|
||||
if (clean($_POST["profile"])) {
|
||||
|
||||
$profile = clean($_POST["profile"]);
|
||||
$profile = (int) clean($_POST["profile"]);
|
||||
|
||||
$sth = $this->pdo->prepare("SELECT id FROM ttrss_settings_profiles
|
||||
WHERE id = ? AND owner_uid = ?");
|
||||
@@ -517,7 +517,9 @@ class Handler_Public extends Handler {
|
||||
|
||||
if ($sth->fetch()) {
|
||||
$_SESSION["profile"] = $profile;
|
||||
}
|
||||
} else {
|
||||
$_SESSION["profile"] = null;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user