If you POST an invalid form build ID to the JS callback, it does not
check whether a value is retrieved from the cache. It then sets data
in the cache using this invalid ID. So – when this callback is
invoked again it will retrieve the data. This invalid ID in the
cache may cause future problems. So, there needs to be a
check that the original ID was valid.

Similar issue for core: http://drupal.org/node/222588

Comments

pwolanin’s picture

Status: Active » Needs work
StatusFileSize
new1.84 KB

looking at this function:

http://api.drupal.org/api/function/form_get_cache/6

It seems we would lose the 'storage' if you use the code I originally suggested (attached).
So the question is really whether it's correct to set $form_state['values'] to $_POST.

pwolanin’s picture

Status: Needs work » Needs review
StatusFileSize
new2.16 KB

ok, here's a patch that seems to actually work.

pwolanin’s picture

StatusFileSize
new2.31 KB

slightly better - this prevents the log from filling with PHP errors if you just visit the callback path.

yched’s picture

Status: Needs review » Fixed

Tested and committed. Thanks !

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.