mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-06-17 06:20:45 +00:00
Fix CSRF not being checked in collection-edit.php
This commit is contained in:
parent
a3acb770ac
commit
c8a0ca4531
@ -66,6 +66,12 @@ if ( isset($privsql) ) {
|
||||
$can_write_collection = ($session->AllowedTo('Admin') || (bindec($permissions->priv) & privilege_to_bits('DAV::bind')) );
|
||||
}
|
||||
|
||||
// Verify CSRF token
|
||||
if($_SERVER['REQUEST_METHOD'] === "POST" && !verifyCsrfPost()) {
|
||||
$c->messages[] = i18n("A valid CSRF token must be provided");
|
||||
$can_write_collection = false;
|
||||
}
|
||||
|
||||
dbg_error_log('collection-edit', "Can write collection: %s", ($can_write_collection? 'yes' : 'no') );
|
||||
|
||||
$pwstars = '@@@@@@@@@@';
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user