mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2026-01-07 03:59:15 +00:00
experimental CSRF protection
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
<?php
|
||||
class Pref_Users extends Protected_Handler {
|
||||
|
||||
function before() {
|
||||
if (parent::before()) {
|
||||
if ($_SESSION["access_level"] < 10) {
|
||||
@@ -12,6 +11,12 @@ class Pref_Users extends Protected_Handler {
|
||||
return false;
|
||||
}
|
||||
|
||||
function csrf_ignore($method) {
|
||||
$csrf_ignored = array("index");
|
||||
|
||||
return array_search($method, $csrf_ignored) !== false;
|
||||
}
|
||||
|
||||
function userdetails() {
|
||||
|
||||
header("Content-Type: text/xml");
|
||||
|
||||
Reference in New Issue
Block a user