Jump to content

Takuya

Members
  • Content Count

    1
  • Joined

  • Last visited


Reputation Activity

  1. Upvote
    Takuya got a reaction from Sidra Harris in Flux CP > block [email protected] From the register on the site   
    You really shouldn't use eregi, the ereg-extension has already been thrown out of PHP by default and it contains many problems, including security-related ones.
     
     
    Stick to preg and use proper PHP validation, go for something like
     
    if (!filter_var($email, FILTER_VALIDATE_EMAIL) || preg_match('/@(mailinator|hotmail|trashmail)\..+$/i', $email)) throw new Flux_RegisterError('Invalid e-mail address', Flux_RegisterError::INVALID_EMAIL_ADDRESS);  
    For more information visit the PHP documentation on ereg and on filter_var. Keep your servers safe, folks.
  2. Upvote
    Takuya got a reaction from Monsieur Panda in Flux CP > block [email protected] From the register on the site   
    You really shouldn't use eregi, the ereg-extension has already been thrown out of PHP by default and it contains many problems, including security-related ones.
     
     
    Stick to preg and use proper PHP validation, go for something like
     
    if (!filter_var($email, FILTER_VALIDATE_EMAIL) || preg_match('/@(mailinator|hotmail|trashmail)\..+$/i', $email)) throw new Flux_RegisterError('Invalid e-mail address', Flux_RegisterError::INVALID_EMAIL_ADDRESS);  
    For more information visit the PHP documentation on ereg and on filter_var. Keep your servers safe, folks.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.