After ceo posted about the imap function I was eager to try it out
and got rather disappointed pretty soon.
imap_rfc822_parse_adrlist() should not be used for email validation!
EXAMPLE:
?php
var_dump(imap_rfc822_parse_adrlist('! # $ % * + - / = ? ^ _ ` { |
} ~', ''));
?
The above code will
var_dump(imap_rfc822_parse_adrlist('! # $ % * + - / = ? ^ _ ` { | } ~',
''));
This looks like a valid localhost email address to me...
What's wrong with it?
:-v
You may want to check that host is non-empty, if you do not expect any
localhost users, and fail on that condition,
ceo wrote:
var_dump(imap_rfc822_parse_adrlist('! # $ % * + - / = ? ^ _ ` { | } ~',
''));
This looks like a valid localhost email address to me...
It surely is a valid localhost email address, but what most people
(and the OP) usually need is to validate a full email string with a
local and a
On Tue, Oct 28, 2008 at 8:57 PM, VamVan [EMAIL PROTECTED] wrote:
SSO process:
$_POST the Email Address and password
Get Authenticated, Get the COOKIE ( Through Oracle IDM suite SOAP call)
Decrypt the COOKIE ( Through Oracle Enterprise business suite SOAP call)
and get the profile Info
When it comes to email validation, I would recommend using the IMAP function
which will be both fast and correct:
http://us.php.net/manual/en/function.imap-rfc822-parse-adrlist.php
Otherwise, it's guaranteed that you are having at least some false positives,
and probably some false
On Wed, Oct 29, 2008 at 5:36 AM, [EMAIL PROTECTED] wrote:
When it comes to email validation, I would recommend using the IMAP function
which will be both fast and correct:
http://us.php.net/manual/en/function.imap-rfc822-parse-adrlist.php
Otherwise, it's guaranteed that you are having at
On Tue, Oct 28, 2008 at 4:10 PM, VamVan [EMAIL PROTECTED] wrote:
Hello Team of Nerds,
I need help in writing a regular expression for this:
invalid character set is:
INVALID_STRING={/,*,+,(,),'\',:,;,~,..,.@,@.};
Then you need to STFW and RTFM. PHP uses Perl-style regexp's, by the
Hello Team of Nerds,
Not the best way to start your request for help.
I need help in writing a regular expression for this:
invalid character set is:
INVALID_STRING={/,*,+,(,),'\',:,;,~,..,.@,@.};
I want to a pregmatch for these characters on my whole email address and if
match is
VamVan wrote:
Hello Team of Nerds,
I need help in writing a regular expression for this:
invalid character set is:
INVALID_STRING={/,*,+,(,),'\',:,;,~,..,.@,@.};
I want to a pregmatch for these characters on my whole email address and if
match is found I need to return false.
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Richard Heyes
Sent: Tuesday, October 28, 2008 4:30 PM
To: VamVan
Cc: php List
Subject: Re: [PHP] Regex validation
Hello Team of Nerds,
Not the best way to start your request for help.
I
If your trying to filter E-Mail addresses, then filter_var is what you
should use:
http://php.net/filter_var
If the OP (original poster) got PHP5+
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Good to know filter_var() exists in PHP5
Unless you have PHP5 you better validate the string in the way of checking
if it is fit's to your allowed characters and not checking if it contains
the NOT allowed charaters.
You better use: [a-z0-9A-Z\_\.]+ instead of [^\)\(\*\[EMAIL PROTECTED] and I
Thank Guys,
I at least got part of it working , not the double words but almost
everything else than that:
function _email_validate($mail_address){
$invalid_charset_pattern = [(*+?)|~:;{}/ ];
if(ereg($invalid_charset_pattern, $mail_address)){
return false;
}else{
return true;
}
}
Keep in mind that ereg will disappear with PHP 6. You might want to use
the preg functions:
http://www.making-the-web.com/2007/09/21/becoming-php-6-compatible/
Thank you,
Micah Gersten
onShore Networks
Internal Developer
http://www.onshore.com
VamVan wrote:
Thank Guys,
I at least got part
On Tue, 2008-10-28 at 18:07 -0500, Micah Gersten wrote:
Keep in mind that ereg will disappear with PHP 6. You might want to use
the preg functions:
http://www.making-the-web.com/2007/09/21/becoming-php-6-compatible/
Thank you,
Micah Gersten
onShore Networks
Internal Developer
Yeah, I understand that its allowed in RFC. But unfortunately I use SSO
layer which decrypts the Cookie to get email address.
This is where it messes up. So I have decided not to allow people to use
that as well.
Thanks
On Tue, Oct 28, 2008 at 5:10 PM, Ashley Sheridan
[EMAIL PROTECTED]wrote:
VamVan a écrit :
This is where it messes up. So I have decided not to allow people to use
that as well.
By that way, you're making a lot of ennemies on this very list :D
--
Mickaël Wolff aka Lupus Michaelis
http://lupusmic.org
--
PHP General Mailing List (http://www.php.net/)
To
What are you talking about with a cookie and an E-Mail address?
Thank you,
Micah Gersten
onShore Networks
Internal Developer
http://www.onshore.com
VamVan wrote:
Yeah, I understand that its allowed in RFC. But unfortunately I use
SSO layer which decrypts the Cookie to get email address.
SSO process:
$_POST the Email Address and password
Get Authenticated, Get the COOKIE ( Through Oracle IDM suite SOAP call)
Decrypt the COOKIE ( Through Oracle Enterprise business suite SOAP call)
and get the profile Info
Thats what happens now.
But there is a glitch in the decryption
How is anything but your webserver decrypting the $_POST data? PHP
should get it after that as is.
Thank you,
Micah Gersten
onShore Networks
Internal Developer
http://www.onshore.com
VamVan wrote:
SSO process:
$_POST the Email Address and password
Get Authenticated, Get the COOKIE (
20 matches
Mail list logo