Skip to content
Extraits de code Groupes Projets
Valider 93430d92 rédigé par thomas's avatar thomas
Parcourir les fichiers

Improve access control checks on Perso::cancel()

parent d88f43c7
Branches
Étiquettes
2 requêtes de fusion!154Escape all values interpolated in SQL queries in the Perso controller,!151Draft: Escape all values interpolated in SQL queries in the Perso controller
...@@ -490,8 +490,11 @@ class Perso extends Controller ...@@ -490,8 +490,11 @@ class Perso extends Controller
public function cancel($f3, $params) public function cancel($f3, $params)
{ {
if (!$f3->exists('SESSION.user')) {
$f3->reroute('/login');
}
$db = $f3->get('DB'); $db = $f3->get('DB');
$result = $db->query("SELECT identifier, user_id from identifiers where identifier like '".$params['id']."'"); $result = $db->query("SELECT identifier, user_id from identifiers where identifier like '".$params['id']."' and user_id='".\Utils::asl($f3->get('SESSION.id'))."'");
$result = $result->fetch(\PDO::FETCH_ASSOC); $result = $result->fetch(\PDO::FETCH_ASSOC);
if ($result) { if ($result) {
$identifier = $result['identifier']; $identifier = $result['identifier'];
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter