logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Building & Member Downloads View previous topic :: View next topic
Reply to topic   Topic: Apache2/Win32 writes files w/ unix CLF
Author
glsmith
Moderator


Joined: 16 Oct 2007
Posts: 2268
Location: Sun Diego, USA

PostPosted: Fri 29 Aug '08 17:36    Post subject: Apache2/Win32 writes files w/ unix CLF Reply with quote

Ever since I went from Apache 1.3 to 2.x I've noticed that certain files (ScriptLog and htpasswd output) are written with unix line endings.

This has caused a lot of grief. Open ScriptLog and you have one line of mess to read through, or convert file in editor and re-open and then it looks as should.

htpasswd.exe writes to separate lines but again, there is no CR/LF so when trying to read in the file with a win32 app, load entries to a list, you get one line input from the file, split on the colon and you just end up with whatever the first username is in the list and again a problem.

What can/could be done about this? Something must be able to be done because as of the last 1.3 version I used (1.3.37) the 1.3 branch wrote the proper line endings in these files.

It seems to do it proper in the normal access/error/transfer log files just the ScriptLog on htpasswd output it's been ignored.

Wish I knew enough to figure this out and not look so dumb Embarassed

Gregg
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7294
Location: Germany, Next to Hamburg

PostPosted: Tue 02 Sep '08 20:15    Post subject: Reply with quote

I tested on the command line

Code:

htpasswd -nbm test test>>out.txt
htpasswd -nbm test2 test2>>out.txt


out.txt
Code:

test:$apr1$o6d4.C5A$J2NN7kFNFzCBPtERaJL3p.

test2:$apr1$iFPLMAuh$m4SGmoyYdiHqpC4NGV9H11


Viewing the Hexeditor I found 0D 0A 0D 0D 0A after the 1st and after the second password. 0D 0A == CR LF == \r\n
So there is a double CR/LF afer eachline

using
Code:

htpasswd -cbm out.txt test2 test2
htpasswd -bm out.txt test2 test2



Code:

test:$apr1$4S1qSCdH$8n1ysYFf/wQG2cOxBP/yV0
test2:$apr1$R69Zzc9T$.ffC.gSZWqhTHJ0suTBKE0

There is NO 0D 0A (CR/LF). Only 0A which is only LF

For me it works with the windows pipes.
Back to top
glsmith
Moderator


Joined: 16 Oct 2007
Posts: 2268
Location: Sun Diego, USA

PostPosted: Mon 08 Sep '08 2:37    Post subject: Reply with quote

and so?

It is post the fix for the predictable salt

htpasswd from 1.3.41 works fine and it is pre-fix
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7294
Location: Germany, Next to Hamburg

PostPosted: Mon 08 Sep '08 14:53    Post subject: Reply with quote

You may report a bug?
https://issues.apache.org/bugzilla/index.cgi
Back to top
glsmith
Moderator


Joined: 16 Oct 2007
Posts: 2268
Location: Sun Diego, USA

PostPosted: Mon 08 Sep '08 19:45    Post subject: Reply with quote

Thanks James,

Guess I'll have to

G
Back to top


Reply to topic   Topic: Apache2/Win32 writes files w/ unix CLF View previous topic :: View next topic
Post new topic   Forum Index -> Building & Member Downloads