Subject: | Bugreport: |
Date: | Thu, 13 Mar 2014 21:30:27 +0100 |
To: | "bug-dancer-plugin-auth-htpasswd rt.cpan.org" <bug-dancer-plugin-auth-htpasswd [...] rt.cpan.org> |
From: | Viktor Malachinski <vma [...] randomcrap.de> |
Hello,
i think there is a bug lying within your Dancer::Plugin::Auth::Htpasswd module.
When the login request pops up in the browser and you press 'OK' without entering anything the plugin will let you enter the restricted area. I tested that with different browsers, same effect.
adding a line like
if (defined $user && defined $password && $user ne '' && $password ne '') {
above
my $htpasswd = Authen::Htpasswd->new($passwd_file);
fixed the problem for me.
Not sure if this is a feature or bug of Authen::Htpasswd, but it returns a positive result for empty/undef user & pw
Best regards
Viktor Malachinski
--