From f16477bc3a498ca9cce2ccb44c4d4c314933ba1d Mon Sep 17 00:00:00 2001 From: jangliss Date: Mon, 13 Jun 2005 02:48:51 +0000 Subject: [PATCH] Bug #1219184. Identity code wasn't checking username for domain portion, if email address was not set, it re-appended domain name to username. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@9601 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- ChangeLog | 2 ++ functions/identity.php | 8 +++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index e40d975b..aa749be2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -362,6 +362,8 @@ Version 1.5.1 -- CVS 508 or WAI fixes. Original idea and patch by dugan passwall.com. - Fixed broken attachments caused by inconsistency of PHP chunk_split(). Thanks to Roalt Zijlstra. + - Identity code was not checking for domain part in username before setting + email address (Bug #1219184). Version 1.5.0 - 2 February 2004 diff --git a/functions/identity.php b/functions/identity.php index b3538c69..5327e5d5 100644 --- a/functions/identity.php +++ b/functions/identity.php @@ -29,7 +29,13 @@ function get_identities() { global $username, $data_dir, $domain; $em = getPref($data_dir,$username,'email_address'); - if ( ! $em ) $em = $username.'@'.$domain; + if ( ! $em ) { + if (strpos($username , '@') == false) { + $em = $username.'@'.$domain; + } else { + $em = $username; + } + } $identities = array(); /* We always have this one, even if the user doesn't use multiple identities */ -- 2.25.1