| Bug #1968 | Submitter's e-mail address shown in correct syntax | ||
|---|---|---|---|
| Submitted: | 27 Nov 2003 6:10 | Modified: | 11 Aug 2004 2:25 | 
| Reporter: | Barry Byrne | Email Updates: | |
| Status: | Closed | Impact on me: | |
| Category: | MySQL Websites: bugs.mysql.com | Severity: | S4 (Feature request) | 
| Version: | OS: | ||
| Assigned to: | CPU Architecture: | Any | |
   [27 Nov 2003 6:10]
   Barry Byrne        
  
 
   [28 Nov 2003 8:04]
   Dean Ellis        
  Email addresses are only displayed if the user has chosen to expose the address in his profile, so I am changing this to a feature request. Thank you.
   [26 Jul 2004 9:06]
   Jacques         
  On the bugs.php.net (php-bugs-web) we have a function called 'spam_protect' which basically obscures email address:
<th>From:</th><td><?php echo htmlspecialchars(spam_protect($bug['email']))?></td>
/* Email spam protection */
function spam_protect($txt)
{
        $translate = array('@' => ' at ', '.' => ' dot ');
        /* php.net addresses are not protected! */
        if (preg_match('/^(.+)@php\.net/i', $txt)) {
                return $txt;
        } else {
                return strtr($txt, $translate);
        }
}
Which can easily be changed to the following to works with bugs.mysql.com
/* Email spam protection */
function spam_protect($txt)
{
        $translate = array('@' => ' at ', '.' => ' dot ');
        /* mysql.com addresses are not protected! */
        if (preg_match('/^(.+)@mysql\.com/i', $txt)) {
                return $txt;
        } else {
                return strtr($txt, $translate);
        }
}
 
   [11 Aug 2004 2:25]
   Jim Winstead        
  Email addresses are never shown to non-MySQL employees now. (This has been true for a while, actually.)
