diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2008-10-11 04:06:29 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2008-10-11 04:06:29 +0000 |
commit | 4f17920c7578fa30ee489914ea83f5b6586b82ef (patch) | |
tree | 25014b3ca7ca4b0c78343ab9c0b6ee58879bda0e /modules/poll/poll.module | |
parent | 819b0e95a9f36fbbc51268e82c5df87b2eb5fb67 (diff) | |
download | brdo-4f17920c7578fa30ee489914ea83f5b6586b82ef.tar.gz brdo-4f17920c7578fa30ee489914ea83f5b6586b82ef.tar.bz2 |
#319466: SA-2008-47 (#295053): CSRF in cached forms.
Diffstat (limited to 'modules/poll/poll.module')
-rw-r--r-- | modules/poll/poll.module | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/poll/poll.module b/modules/poll/poll.module index 5dd356f1b..21d48cba2 100644 --- a/modules/poll/poll.module +++ b/modules/poll/poll.module @@ -366,7 +366,9 @@ function poll_choice_js() { // not process it. We retreive the cached form, add the element, and resave. $form_build_id = $_POST['form_build_id']; $form_state = array('submitted' => FALSE); - $form = form_get_cache($form_build_id, $form_state); + if (!$form = form_get_cache($form_build_id, $form_state)) { + exit(); + } $delta = count($_POST['choice']); $key = isset($form['#node']->choice) ? 'new:'. ($delta - count($form['#node']->choice)) : 'new:'. $delta; |