summaryrefslogtreecommitdiff
path: root/classes/rpc.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2011-12-26 12:02:52 +0400
committerAndrew Dolgov <[email protected]>2011-12-26 12:02:52 +0400
commit8484ce22584b8714622833adcc7ebfe3ef9cf90e (patch)
tree057d7a64c3af60e2389d519ba19e476b5fbe6212 /classes/rpc.php
parent036cd3a4106cf2eee0be72f0695458dfb517976b (diff)
experimental CSRF protection
Diffstat (limited to 'classes/rpc.php')
-rw-r--r--classes/rpc.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/classes/rpc.php b/classes/rpc.php
index 8145b0407..4cdaef935 100644
--- a/classes/rpc.php
+++ b/classes/rpc.php
@@ -1,6 +1,12 @@
<?php
class RPC extends Protected_Handler {
+ function csrf_ignore($method) {
+ $csrf_ignored = array("sanitycheck", "buttonplugin");
+
+ return array_search($method, $csrf_ignored) !== false;
+ }
+
function setprofile() {
$id = db_escape_string($_REQUEST["id"]);