Click here to get back home

Digest Authentication encoding issue

 HomeNewsGroups | Search | About
 comp.lang.perl.misc    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
Digest Authentication encoding issue =?ISO-8859-7?B?zd/q7/I=?= 03-21-2008
Posted by =?ISO-8859-7?B?zd/q7/I=?= on March 21, 2008, 6:38 am
Please log in for more thread options
Hello when i try the following code from cmd

htdigest -c "C:\path\passfile" "=CE=94=CE=B7=CE=BC=CE=B9=CE=BF=CF=85=CF=81=
=CE=B3=CE=AF=CE=B1 =CE=92=CE=AC=CF=83=CE=B7=CF=82 =CE=94=CE=B5=CE=B4=CE=BF=
=CE=BC=CE=AD=CE=BD=CF=89=CE=BD!" webmaster
[download]

console understand it as Adding password for webmaster in realm
=E2=95=AC=CE=A6=E2=95=AC=E2=95=96=E2=95=AC=E2=95=9D=E2=95=AC=E2=95=A3=E2=95=
=AC=E2=94=90=E2=95=A7=CE=96=E2=95=A7=CE=92=E2=95=AC=E2=94=82=E2=95=AC=CF=88=
=E2=95=AC=E2=96=92 =E2=95=AC=CE=A4=E2=95=AC=CF=85=E2=95=A7=CE=94=E2=95=AC=E2=
=95=96=E2=95=A7=CE=93 =E2=95=AC=CE=A6=E2=95=AC=E2=95=A1=E2=95=AC=E2=94=A4=E2=
=95=AC=E2=94=90=E2=95=AC =E2=95=9D=E2=95=AC=CF=86=E2=95=AC=E2=95=9C=E2=95=A7=
=CE=9A=E2=95=AC=E2=95=9C!. as a result not
a proper md5 crypt of the realm resultign to a faulty authentication

What can i do? Sorry for this not beign a perl questiosn i tried other
forums but i though of askignj this here perhaps to see if i can a
result by trying the same thing from within a perl script file. But
wont ti also use dos to take place like? in backticks still wotn work:
print `htdigest -c "C:\path\passfile" "=CE=94=CE=B7=CE=BC=CE=B9=CE=BF=CF=85=
=CF=81=CE=B3=CE=AF=CE=B1 =CE=92=CE=AC=CF=83=CE=B7=CF=82 =CE=94=CE=B5=CE=B4=
=CE=BF=CE=BC=CE=AD=CE=BD=CF=89=CE=BD!"
webmaster so what's left?

Here is what i my attempt to do the same thing through a cgi perl
script using the Digest::MD5 module

open FILE, ">>$ENV/some_path/some_other_path/
some_pass_file" or die $!; print FILE "webmaster:=CE=94=CE=B7=CE=BC=CE=B9=CE=
=BF=CF=85=CF=81=CE=B3=CE=AF=CE=B1 =CE=92=CE=AC=CF=83=CE=B7=CF=82
=CE=94=CE=B5=CE=B4=CE=BF=CE=BC=CE=AD=CE=BD=CF=89=CE=BD!:" .Digest::MD5::md5_=
hex("admin:=CE=94=CE=B7=CE=BC=CE=B9=CE=BF=CF=85=CF=81=CE=B3=CE=AF=CE=B1 =CE=
=92=CE=AC=CF=83=CE=B7=CF=82
=CE=94=CE=B5=CE=B4=CE=BF=CE=BC=CE=AD=CE=BD=CF=89=CE=BD!:this_is_the_pass") .=
"\n"; close FILE;
[download]

But when it comes to authentication when i enter the credentials
apache says there are wrong.
An encoding issue again? the init.pl file which the above code resides
is encoded in 'UTF-8'.

Please suggest something else than hitting my head on the wall

so please someone answer me, is this an encoding issue again?
Why when the user gives the username and password at http
authentication the credentials won't match the ones stored in the
password file?
What might be the problem? ?You think its encoding?

ps. I must tell you i aksed this in devshed and perlmonks but didnt
get any luck so iam posting here too for help. Thenk you.

Posted by =?ISO-8859-7?B?zd/q7/I=?= on March 26, 2008, 12:35 pm
Please log in for more thread options
Thanks for the help.

Similar ThreadsPosted
Can't locate Digest/SHA.pm cannot install Digest/SHA November 28, 2007, 4:32 pm
Re: polymorphic regex -- encoding issue October 18, 2007, 8:36 am
polymorphic regex -- encoding issue October 18, 2007, 4:28 am
Why doesn't Digest::MD5::md5_hex match GNU md5sum? November 21, 2007, 5:18 pm
(Newbie Question) Digest::MD5 CPAN module compilation errors December 3, 2004, 11:07 am
LWP authentication on asp page March 23, 2005, 10:32 pm
NET::SMTP and Authentication July 19, 2007, 7:06 pm
HTTP Authentication with LWP November 16, 2007, 4:19 am
PERL automatic authentication July 14, 2004, 4:30 pm
HTTP Get with Proxy authentication January 17, 2005, 3:42 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap