Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

Re^2: Digest Authentication encoding issue

by Nik
on Mar 21, 2008 at 13:38 UTC ( #675412=note: print w/replies, xml ) Need Help??

in reply to Re: Digest Authentication encoding issue
in thread Digest Authentication encoding issue

Very good idea i have googled for that to find out what encoding apache wants the passwords to be but i didnt find any relevant info

So you are saying that inside my perl script iam currently creating the passwords as utf-8 but apache expect a different character set?

But hold seeign the following code how can i be sure the password file being created will stored contents in utf-8 format?

open FILE, ">$ENV{'DOCUMENT_ROOT'}/some_path/some_other_path/some_pass +_file" or die $!; print FILE "webmaster:realm made by greek chars!:" .Digest::MD5::m +d5_hex("webmaster:realm made by greek chars!:password") ."\n"; close FILE;
Is it because the scripts has this line print header( -charset=>'utf-8' ); means that every text and every file created by will be stored as utf-8 too?

UPDATE: BASED on i beleive apache expects them only in ISO 8859-1 if i understood the site correctly but please check it too.

Based on that assumption i did try this:

open FILE, ">:encoding(iso-8859-1)", "$ENV{'DOCUMENT_ROOT'}/some_path/ +some_other_path/some_pass_file" or die $!; print FILE "webmaster:realm made by greek chars!:" .Digest::MD5::m +d5_hex("webmaster:realm made by greek chars!:password") ."\n"; close FILE;
The idea is to force the contents of the newly created file that contains the passwords that Apache checks to be stored as latin1-iso, but unfortunately that didnt work either.

Now that i think of it my realm contains greek chars and i tell perl to store them in the passowrd file as latin1-iso, but thats impossible right? Either that is the problem now or the apache doesnt excpect the encoding toi be iso-8859-1

I really did my best to solve this problem so now i deserve to hear from you.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://675412]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (14)
As of 2017-05-25 17:07 GMT
Find Nodes?
    Voting Booth?