Welcome! Log In Create A New Profile

Advanced

Re: Error pages/Web Authentication

Maxim Dounin
July 07, 2011 01:24PM
Hello!

On Thu, Jul 07, 2011 at 11:14:27AM -0400, tsaavik wrote:

> Maxim Dounin Wrote:
> -------------------------------------------------------
> > 1. Does Nginx support SHA encryption for the basic web
> authentication?
> > When I use -s switch with htpasswd command I can't log in...
>
> I ran into this issue just the other day with htpasswd -s. I noticed
> that if I modified the output of htpasswd from {SHA} to {SSHA} I was
> able to use the generated password with nginx 1.0.4.
>
> I wonder if it is feasible to add the following to ngx_crypt.c to be
> more compatible with the output of htpasswd? Please note, I'm no
> cryptologist and barely a programmer, but I do sleep in Holiday Inns.

Your patch will work as {SHA} is identical to {SSHA} with an
empty salt. But I'm not really sure we want to support {SHA} at
all as it's vulnerable to rainbow table attacks and really isn't
secure. You shouldn't use it unless you really need compatibility
with some old software.

Please also note that $apr1$ (as generated by htpasswd -m, aka
apache md5) is *more* secure than both {SHA} and {SSHA}. If you
just want something compatible with Apache and secure - use $apr1$
instead.

Maxim Dounin

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

Error pages/Web Authentication

HTF June 09, 2011 10:17AM

Re: Error pages/Web Authentication

Maxim Dounin June 09, 2011 12:18PM

Re: Error pages/Web Authentication

HTF June 09, 2011 01:01PM

Re: Error pages/Web Authentication

Maxim Dounin June 09, 2011 02:00PM

Re: Error pages/Web Authentication

HTF June 09, 2011 05:43PM

Re: Error pages/Web Authentication

António P. P. Almeida June 10, 2011 01:32PM

Re: Error pages/Web Authentication

HTF June 10, 2011 01:48PM

Re: Error pages/Web Authentication

HTF June 10, 2011 01:59PM

Re: Error pages/Web Authentication

António P. P. Almeida June 10, 2011 02:00PM

Re: Error pages/Web Authentication

tsaavik July 07, 2011 11:14AM

Re: Error pages/Web Authentication

Maxim Dounin July 07, 2011 01:24PM

Re: Error pages/Web Authentication

HTF June 10, 2011 02:13PM

Re: Error pages/Web Authentication

HTF June 11, 2011 04:55AM

Re: Error pages/Web Authentication

Maxim Dounin June 11, 2011 06:30AM

Re: Error pages/Web Authentication

HTF June 14, 2011 11:21PM

Re: Error pages/Web Authentication

Maxim Dounin June 15, 2011 04:06AM

Re: Error pages/Web Authentication

HTF June 15, 2011 08:34AM

Re: Error pages/Web Authentication

Maxim Dounin June 15, 2011 03:32PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 210
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready