diff options
author | thomascube <thomas@roundcube.net> | 2009-07-16 15:01:05 +0000 |
---|---|---|
committer | thomascube <thomas@roundcube.net> | 2009-07-16 15:01:05 +0000 |
commit | 881217a5c95dbfe4e62154a2c0edd135b504220e (patch) | |
tree | bd344407d4c75a3e0004599cbd760fbb35b7fcde /program/steps/addressbook/delete.inc | |
parent | 7477973d931ffb816b2cbbad9c5bc06e3ef2ecd8 (diff) |
Force ajax calls to protect from CSRF
Diffstat (limited to 'program/steps/addressbook/delete.inc')
-rw-r--r-- | program/steps/addressbook/delete.inc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/program/steps/addressbook/delete.inc b/program/steps/addressbook/delete.inc index 6ab9cc3df..1611ae1a1 100644 --- a/program/steps/addressbook/delete.inc +++ b/program/steps/addressbook/delete.inc @@ -5,7 +5,7 @@ | program/steps/addressbook/delete.inc | | | | This file is part of the RoundCube Webmail client | - | Copyright (C) 2005-2007, RoundCube Dev. - Switzerland | + | Copyright (C) 2005-2009, RoundCube Dev. - Switzerland | | Licensed under the GNU GPL | | | | PURPOSE: | @@ -19,7 +19,8 @@ */ -if (($cid = get_input_value('_cid', RCUBE_INPUT_POST)) && +if ($OUTPUT->ajax_call && + ($cid = get_input_value('_cid', RCUBE_INPUT_POST)) && (preg_match('/^[0-9]+(,[0-9]+)*$/', $cid) || preg_match('/^[a-zA-Z0-9=]+(,[a-zA-Z0-9=]+)*$/', $cid)) ) |