freman / caddy-reauth

Auth your Caddyserver requests against another server
MIT License
27 stars 15 forks source link

[ldap] Trying to log in with unknown user yields error 500 #19

Closed TheOneValen closed 5 years ago

TheOneValen commented 5 years ago

Hi!

I Configured reauth to use ldap with a group filter. As failure mechanism I use Basic Auth.

When I try to log in with a user that is not in the group, or a non-existing user, caddy now yields an error 500.

Due to the browser mechanics it stays that way until I clear all caches.

I Think it should yield a 401 so the user can try again.

Greetings! Valen

freman commented 5 years ago

Hi.

That definitely sounds like a bug not a feature, I'll take a look as soon as I can.

mh720 commented 5 years ago

Hi folks, I posted a similar situation yesterday within the caddy.community with some logs:

https://caddy.community/t/tls-error-reading-preface-from-client/4580

-mike

freman commented 5 years ago

Thanks Mike.

Sorry I still haven't had a chance to look at this, work is chaos at the moment and I've been renovating.

I suspect it's a side effect of basic auth which is supposed to just keep prompting you for credentials when auth fails.

I'll see what I can do about taking a look tonight.

xkrt commented 5 years ago

Can you release this, plz!