Re: [PHP] HTTP Authentication thru PHP

2003-11-19 Thread Sophie Mattoug
Jay Blanchard wrote: Or colons. It is a Bad Practice[tm] to use any special characters in user names and/or passwords. It is not universally allowed from OS to OS I disagree with this : special characters are useful to have better passwords (more difficult to crack), but as apache stores the so

RE: [PHP] HTTP Authentication thru PHP

2003-11-19 Thread Jay Blanchard
[snip] I think I can remember semi-colon is not allowed in apache logins or passwords... >But the above is not working when the $username contains a trailing >semicolon >or when the $password is starting with a semicolon, >Ex: what if the $username ="chandu:" [/snip] Or colons. It is a Bad Pract

Re: [PHP] HTTP Authentication thru PHP

2003-11-19 Thread Sophie Mattoug
I think I can remember semi-colon is not allowed in apache logins or passwords... Chandu Nannapaneni wrote: hello all , I'm able to get successfully http authenticated from my php scripts Ex : $header = "POST /myscript.php HTTP/1.0\r\nAuthorization: Basic "; $header .= base64_encode("$us

RE: [PHP] HTTP Authentication thru PHP

2003-11-19 Thread Dan Joseph
Hi, > But the above is not working when the $username contains a trailing > semicolon > or when the $password is starting with a semicolon, > Ex: what if the $username ="chandu:" > > Is there any solution for this ? You could use str_replace to strip those before they get used. -Dan Jos

[PHP] HTTP Authentication thru PHP

2003-11-19 Thread Chandu Nannapaneni
hello all , I'm able to get successfully http authenticated from my php scripts Ex : $header = "POST /myscript.php HTTP/1.0\r\nAuthorization: Basic "; $header .= base64_encode("$username:$password")."\r\n"; $header .= "Content-type: application/x-www-form-urlencoded\r\n";