Changeset 4714 in subversion
- Timestamp:
- May 1, 2011 3:27:15 PM (2 years ago)
- File:
-
- 1 edited
-
trunk/roundcubemail/program/include/main.inc (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/roundcubemail/program/include/main.inc
r4705 r4714 1680 1680 // %z - IMAP domain without first part, e.g. %h=imap.domain.tld, %z=domain.tld 1681 1681 $z = preg_replace('/^[^\.]+\./', '', $h); 1682 // %s - domain name after the '@' from e-mail address provided at login screen 1683 if ( filter_var(get_input_value('_user', RCUBE_INPUT_POST), FILTER_VALIDATE_EMAIL) !== FALSE ) 1684 preg_match('/[^@]+$/', get_input_value('_user', RCUBE_INPUT_POST), $s); 1685 1686 $name = str_replace(array('%n', '%d', '%h', '%z', '%s'), array($n, $d, $h, $z, $s[0]), $name); 1682 // %s - domain name after the '@' from e-mail address provided at login screen. Returns FALSE if an invalid email is provided 1683 if ( strpos($name, '%s') !== false ){ 1684 $user_email = rcube_idn_convert(get_input_value('_user', RCUBE_INPUT_POST), true); 1685 if ( preg_match('/(.*)@([a-z0-9\.\-\[\]\:]+)/i', $user_email, $s) < 1 || filter_var($s[1]."@".$s[2], FILTER_VALIDATE_EMAIL) === false ) 1686 return false; 1687 } 1688 1689 $name = str_replace(array('%n', '%d', '%h', '%z', '%s'), array($n, $d, $h, $z, $s[2]), $name); 1687 1690 return $name; 1688 1691 }
Note: See TracChangeset
for help on using the changeset viewer.
