Changeset 6109 in subversion
- Timestamp:
- Apr 21, 2012 12:32:55 PM (13 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/roundcubemail/program/steps/settings/save_identity.inc
r5787 r6109 26 26 27 27 $a_save_cols = array('name', 'email', 'organization', 'reply-to', 'bcc', 'standard', 'signature', 'html_signature'); 28 $a_html_cols = array('signature', 'name', 'organization');29 28 $a_boolean_cols = array('standard', 'html_signature'); 30 29 $updated = $default_id = false; … … 44 43 $fname = '_'.$col; 45 44 if (isset($_POST[$fname])) 46 $save_data[$col] = get_input_value($fname, RCUBE_INPUT_POST, in_array($col, $a_html_cols));45 $save_data[$col] = get_input_value($fname, RCUBE_INPUT_POST, true); 47 46 } 48 47 … … 61 60 62 61 // Validate e-mail addresses 63 foreach (array('email', 'reply-to', 'bcc') as $item) { 64 if ($email = $save_data[$item]) { 65 $ascii_email = rcube_idn_to_ascii($email); 66 if (!check_email($ascii_email)) { 67 // show error message 68 $OUTPUT->show_message('emailformaterror', 'error', array('email' => $email), false); 69 rcmail_overwrite_action('edit-identity'); 70 return; 71 } 62 $email_checks = array(rcube_idn_to_ascii($save_data['email'])); 63 foreach (array('reply-to', 'bcc') as $item) { 64 foreach (rcube_mime::decode_address_list(rcube_idn_to_ascii($save_data[$item]), null, false) as $rcpt) 65 $email_checks[] = $rcpt['mailto']; 66 } 67 68 foreach ($email_checks as $email) { 69 if ($email && !check_email($email)) { 70 // show error message 71 $OUTPUT->show_message('emailformaterror', 'error', array('email' => rcube_idn_to_utf8($email)), false); 72 rcmail_overwrite_action('edit-identity'); 73 return; 72 74 } 73 75 }
Note: See TracChangeset
for help on using the changeset viewer.
