summaryrefslogtreecommitdiff
path: root/program/steps/addressbook/copy.inc
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2009-07-16 15:01:05 +0000
committerthomascube <thomas@roundcube.net>2009-07-16 15:01:05 +0000
commit881217a5c95dbfe4e62154a2c0edd135b504220e (patch)
treebd344407d4c75a3e0004599cbd760fbb35b7fcde /program/steps/addressbook/copy.inc
parent7477973d931ffb816b2cbbad9c5bc06e3ef2ecd8 (diff)
Force ajax calls to protect from CSRF
Diffstat (limited to 'program/steps/addressbook/copy.inc')
-rw-r--r--program/steps/addressbook/copy.inc4
1 files changed, 4 insertions, 0 deletions
diff --git a/program/steps/addressbook/copy.inc b/program/steps/addressbook/copy.inc
index 75190a611..a27b67b09 100644
--- a/program/steps/addressbook/copy.inc
+++ b/program/steps/addressbook/copy.inc
@@ -19,6 +19,10 @@
*/
+// only process ajax requests
+if (!$OUTPUT->ajax_call)
+ return;
+
$cid = get_input_value('_cid', RCUBE_INPUT_POST);
$target = get_input_value('_to', RCUBE_INPUT_POST);
if ($cid && preg_match('/^[a-z0-9\-_=]+(,[a-z0-9\-_=]+)*$/i', $cid) && strlen($target) && $target != $source)