mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
Re-add CRSF tokens to most package actions
We fixed all known CRSF vulnerabilities in commit2c93f0a
(Implement token system to fix CSRF vulnerabilities, 2012-06-23).c349cb2
(Add virtual path support for package actions, 2012-07-17) partly reverted this by injecting a valid CRSF token when virtual paths are in use. This patch allows for keeping the virtual path feature, while reintroducing POST forms and CRSF tokens. Actions like package flagging, votes and notifications are no longer prone to CRSF (see FS#35437 for details). Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
This commit is contained in:
parent
3bc951e3d8
commit
69b98efa35
2 changed files with 6 additions and 4 deletions
|
@ -59,10 +59,6 @@ if (!empty($tokens[1]) && '/' . $tokens[1] == get_pkg_route()) {
|
|||
return;
|
||||
}
|
||||
|
||||
if (isset($_COOKIE['AURSID'])) {
|
||||
$_POST['token'] = $_COOKIE['AURSID'];
|
||||
}
|
||||
|
||||
$_POST['IDs'] = array(pkgid_from_name($tokens[2]) => '1');
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue