- Fix the idn_convert() function call that was preventing the login with the "%s" replacement variable in config.

pull/1/head
vbenincasa 13 years ago
parent 24f1bf0f91
commit 59db17b823

@ -1,4 +1,4 @@
<?php <?php
/* /*
+-----------------------------------------------------------------------+ +-----------------------------------------------------------------------+
@ -628,7 +628,7 @@ class rcube_utils
// %s - domain name after the '@' from e-mail address provided at login screen. Returns FALSE if an invalid email is provided // %s - domain name after the '@' from e-mail address provided at login screen. Returns FALSE if an invalid email is provided
if (strpos($name, '%s') !== false) { if (strpos($name, '%s') !== false) {
$user_email = self::get_input_value('_user', self::INPUT_POST); $user_email = self::get_input_value('_user', self::INPUT_POST);
$user_email = rcube_idn_convert($user_email, true); $user_email = rcube_utils::idn_convert($user_email, true);
$matches = preg_match('/(.*)@([a-z0-9\.\-\[\]\:]+)/i', $user_email, $s); $matches = preg_match('/(.*)@([a-z0-9\.\-\[\]\:]+)/i', $user_email, $s);
if ($matches < 1 || filter_var($s[1]."@".$s[2], FILTER_VALIDATE_EMAIL) === false) { if ($matches < 1 || filter_var($s[1]."@".$s[2], FILTER_VALIDATE_EMAIL) === false) {
return false; return false;

Loading…
Cancel
Save