NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: bin/59181: bozo httpd(8) .htpasswd generation with pwhash(1) broken



The following reply was made to PR bin/59181; it has been noted by GNATS.

From: Martin Husemann <martin%duskware.de@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: 
Subject: Re: bin/59181: bozo httpd(8) .htpasswd generation with pwhash(1)
 broken
Date: Sun, 16 Mar 2025 18:08:21 +0100

 Funny, I must have done something wrong in my initial testing. It actually
 works all fine with all variants of pwhashes:
 
 [/tmp] martin@big-apple > cat testdir/.htpasswd
 # from the wikipedia example: Aladdin:open sesame
 # created by: echo "open sesame" | pwhash
 # Aladdin:$sha1$19331$sHrEsGlb$.zlZS808bGI7h7Zn68op6MaYLi0S
 Aladdin:$argon2id$v=19$m=8192,t=8,p=1$UFsN2Uo0meUptIhg$gx5OgxU6Ob3b3HhkRMaJcqpur5Y/aL/acynapZead+E
 [/tmp] martin@big-apple > cat test_auth.in 
 get /testdir/hello.txt HTTP/1.1
 Host: example.com
 Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
 
 [/tmp] martin@big-apple > cat testdir/hello.txt 
 hello world!
 [/tmp] martin@big-apple > /usr/libexec/httpd . < test_auth.in
 got request ``get /testdir/hello.txt HTTP/1.1'' from host <local> to port <stdin>
 HTTP/1.1 200 OK
 Date: Sun, 16 Mar 2025 17:07:11 GMT
 Server: bozohttpd/20240428
 Accept-Ranges: bytes
 Last-Modified: Sun, 16 Mar 2025 16:53:10 GMT
 Content-Type: text/plain
 Content-Length: 13
 Connection: close
 
 hello world!
 
 
 So problem must have been some copy&pasto during original test setup or an
 edit mishap.
 
 Martin
 


Home | Main Index | Thread Index | Old Index