diff options
author | David Rothstein <drothstein@gmail.com> | 2014-12-01 18:33:09 -0500 |
---|---|---|
committer | David Rothstein <drothstein@gmail.com> | 2014-12-01 18:33:09 -0500 |
commit | 8bbc2d2ea0bfb6cf12f5f6f3edf82cca6429d046 (patch) | |
tree | 54ca4e1dc49517a556107c237c77ee5355c648d0 /modules/system | |
parent | de8762b201863542b1867737997a45c7100b8f2f (diff) | |
download | brdo-8bbc2d2ea0bfb6cf12f5f6f3edf82cca6429d046.tar.gz brdo-8bbc2d2ea0bfb6cf12f5f6f3edf82cca6429d046.tar.bz2 |
Issue #2380053 by klausi, pwolanin, tsphethean, sun, David_Rothstein: Posting an array as value of a form element is allowed even when a string is expected (and bypasses #maxlength constraints) - first step: text fields
Diffstat (limited to 'modules/system')
-rw-r--r-- | modules/system/system.module | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/modules/system/system.module b/modules/system/system.module index a27493579..6a6200ea1 100644 --- a/modules/system/system.module +++ b/modules/system/system.module @@ -374,6 +374,9 @@ function system_element_info() { '#element_validate' => array('form_validate_machine_name'), '#theme' => 'textfield', '#theme_wrappers' => array('form_element'), + // Use the same value callback as for textfields; this ensures that we only + // get string values. + '#value_callback' => 'form_type_textfield_value', ); $types['password'] = array( '#input' => TRUE, @@ -382,6 +385,9 @@ function system_element_info() { '#process' => array('ajax_process_form'), '#theme' => 'password', '#theme_wrappers' => array('form_element'), + // Use the same value callback as for textfields; this ensures that we only + // get string values. + '#value_callback' => 'form_type_textfield_value', ); $types['password_confirm'] = array( '#input' => TRUE, |