Commit 3fb218cb authored by Gábor Hojtsy's avatar Gábor Hojtsy

#182310 by chx: remove #DANGEROUS_SKIP_CHECK, as with the AHAH functionality...

#182310 by chx: remove #DANGEROUS_SKIP_CHECK, as with the AHAH functionality now we have safer methods to add things in the cached form for validation, so we don't need this security hole possibility kept anymore.
parent 8cf6fefe
......@@ -567,9 +567,7 @@ function _form_validate($elements, &$form_state, $form_id = NULL) {
form_error($elements, t('!name cannot be longer than %max characters but is currently %length characters long.', array('!name' => empty($elements['#title']) ? $elements['#parents'][0] : $elements['#title'], '%max' => $elements['#maxlength'], '%length' => drupal_strlen($elements['#value']))));
}
// Add legal choice check if element has #options. Can be skipped, but
// then you must validate your own element.
if (isset($elements['#options']) && isset($elements['#value']) && !isset($elements['#DANGEROUS_SKIP_CHECK'])) {
if (isset($elements['#options']) && isset($elements['#value'])) {
if ($elements['#type'] == 'select') {
$options = form_options_flatten($elements['#options']);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment