diff options
author | wn_ <[email protected]> | 2021-11-12 02:01:31 +0000 |
---|---|---|
committer | wn_ <[email protected]> | 2021-11-12 02:01:31 +0000 |
commit | 5606e38bff619c388c9621dde30f0d54127a21f4 (patch) | |
tree | 1841d1057ac1b05df9b8854696042ecae1124056 | |
parent | 57bf56f7945b639d0e39f4c7ad9da161a4a18888 (diff) |
Update signature of handler 'csrf_ignore' to include types.
-rwxr-xr-x | classes/feeds.php | 2 | ||||
-rw-r--r-- | classes/handler.php | 2 | ||||
-rw-r--r-- | classes/ihandler.php | 2 | ||||
-rw-r--r-- | classes/opml.php | 2 | ||||
-rw-r--r-- | classes/pluginhandler.php | 2 | ||||
-rwxr-xr-x | classes/pref/feeds.php | 2 | ||||
-rwxr-xr-x | classes/pref/filters.php | 2 | ||||
-rw-r--r-- | classes/pref/labels.php | 2 | ||||
-rw-r--r-- | classes/pref/prefs.php | 2 | ||||
-rw-r--r-- | classes/pref/system.php | 2 | ||||
-rw-r--r-- | classes/pref/users.php | 2 | ||||
-rwxr-xr-x | classes/rpc.php | 2 |
12 files changed, 12 insertions, 12 deletions
diff --git a/classes/feeds.php b/classes/feeds.php index c9f47463f..951675adb 100755 --- a/classes/feeds.php +++ b/classes/feeds.php @@ -8,7 +8,7 @@ class Feeds extends Handler_Protected { private $viewfeed_timestamp; private $viewfeed_timestamp_last; - function csrf_ignore($method) { + function csrf_ignore(string $method): bool { $csrf_ignored = array("index"); return array_search($method, $csrf_ignored) !== false; diff --git a/classes/handler.php b/classes/handler.php index 09557c284..4c79628db 100644 --- a/classes/handler.php +++ b/classes/handler.php @@ -8,7 +8,7 @@ class Handler implements IHandler { $this->args = $args; } - function csrf_ignore($method) { + function csrf_ignore(string $method): bool { return false; } diff --git a/classes/ihandler.php b/classes/ihandler.php index 01c9e3109..8345839c0 100644 --- a/classes/ihandler.php +++ b/classes/ihandler.php @@ -1,6 +1,6 @@ <?php interface IHandler { - function csrf_ignore($method); + function csrf_ignore(string $method): bool; function before($method); function after(); } diff --git a/classes/opml.php b/classes/opml.php index e0dbebcda..f60918061 100644 --- a/classes/opml.php +++ b/classes/opml.php @@ -1,7 +1,7 @@ <?php class OPML extends Handler_Protected { - function csrf_ignore($method) { + function csrf_ignore(string $method): bool { $csrf_ignored = array("export", "import"); return array_search($method, $csrf_ignored) !== false; diff --git a/classes/pluginhandler.php b/classes/pluginhandler.php index 75b823822..9b3772ddc 100644 --- a/classes/pluginhandler.php +++ b/classes/pluginhandler.php @@ -1,6 +1,6 @@ <?php class PluginHandler extends Handler_Protected { - function csrf_ignore($method) { + function csrf_ignore(string $method): bool { return true; } diff --git a/classes/pref/feeds.php b/classes/pref/feeds.php index ac0874259..ce1a53bef 100755 --- a/classes/pref/feeds.php +++ b/classes/pref/feeds.php @@ -5,7 +5,7 @@ class Pref_Feeds extends Handler_Protected { const E_ICON_UPLOAD_FAILED = 'E_ICON_UPLOAD_FAILED'; const E_ICON_UPLOAD_SUCCESS = 'E_ICON_UPLOAD_SUCCESS'; - function csrf_ignore($method) { + function csrf_ignore(string $method): bool { $csrf_ignored = array("index", "getfeedtree", "savefeedorder"); return array_search($method, $csrf_ignored) !== false; diff --git a/classes/pref/filters.php b/classes/pref/filters.php index c4017e4ec..8bc32939d 100755 --- a/classes/pref/filters.php +++ b/classes/pref/filters.php @@ -1,7 +1,7 @@ <?php class Pref_Filters extends Handler_Protected { - function csrf_ignore($method) { + function csrf_ignore(string $method): bool { $csrf_ignored = array("index", "getfiltertree", "savefilterorder"); return array_search($method, $csrf_ignored) !== false; diff --git a/classes/pref/labels.php b/classes/pref/labels.php index 0eb88ea36..81b85481b 100644 --- a/classes/pref/labels.php +++ b/classes/pref/labels.php @@ -1,7 +1,7 @@ <?php class Pref_Labels extends Handler_Protected { - function csrf_ignore($method) { + function csrf_ignore(string $method): bool { $csrf_ignored = array("index", "getlabeltree"); return array_search($method, $csrf_ignored) !== false; diff --git a/classes/pref/prefs.php b/classes/pref/prefs.php index c45d6d6ea..3a39bf981 100644 --- a/classes/pref/prefs.php +++ b/classes/pref/prefs.php @@ -17,7 +17,7 @@ class Pref_Prefs extends Handler_Protected { const PI_ERR_PLUGIN_NOT_FOUND = "PI_ERR_PLUGIN_NOT_FOUND"; const PI_ERR_NO_WORKDIR = "PI_ERR_NO_WORKDIR"; - function csrf_ignore($method) { + function csrf_ignore(string $method): bool { $csrf_ignored = array("index", "updateself", "otpqrcode"); return array_search($method, $csrf_ignored) !== false; diff --git a/classes/pref/system.php b/classes/pref/system.php index 8bebcc7ce..356adee0c 100644 --- a/classes/pref/system.php +++ b/classes/pref/system.php @@ -4,7 +4,7 @@ class Pref_System extends Handler_Administrative { private $log_page_limit = 15; - function csrf_ignore($method) { + function csrf_ignore(string $method): bool { $csrf_ignored = array("index"); return array_search($method, $csrf_ignored) !== false; diff --git a/classes/pref/users.php b/classes/pref/users.php index aeba296b2..3c952b11b 100644 --- a/classes/pref/users.php +++ b/classes/pref/users.php @@ -1,6 +1,6 @@ <?php class Pref_Users extends Handler_Administrative { - function csrf_ignore($method) { + function csrf_ignore(string $method): bool { return $method == "index"; } diff --git a/classes/rpc.php b/classes/rpc.php index 6d56f039e..4024aae2e 100755 --- a/classes/rpc.php +++ b/classes/rpc.php @@ -1,7 +1,7 @@ <?php class RPC extends Handler_Protected { - /*function csrf_ignore($method) { + /*function csrf_ignore(string $method): bool { $csrf_ignored = array("completelabels"); return array_search($method, $csrf_ignored) !== false; |