diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index 17717a66b..8ec9caa79 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -17,6 +17,8 @@ - fixed #10365: Head tags do not work "Use Packed Head Tags". - fixed #9927: Survey - verbatim - fixed #10352: Deleting a user does not clean up any address books + - Fixed the problem with Basic Auth that UK fixed, but in a different way + that still allows non-realm based Basic authentication. - fixed #10228: Calendar: Weekly re-occurence function not working properly ( Martin Kamerbeek / Oqapi ) diff --git a/lib/WebGUI.pm b/lib/WebGUI.pm index a8e854517..e457c6421 100644 --- a/lib/WebGUI.pm +++ b/lib/WebGUI.pm @@ -168,18 +168,15 @@ sub handler { my $gotMatch = 0; # handle basic auth - # Get the type of authorization required for this request (the per - # directory configuration directive AuthType): - my $auth = $request->auth_type; - + my $auth = $request->headers_in->{'Authorization'}; + warn "auth: ".$auth; if ($auth =~ m/^Basic/) { # machine oriented - # Get username and password from Apache and hand over to authen - my $basicAuthUser = $request->get_remote_logname; - my $basicAuthPass = $request->get_basic_auth_pw; - authen($request, $basicAuthUser, $basicAuthPass, $config); + # Get username and password from Apache and hand over to authen + $auth =~ s/Basic //; + authen($request, split(":", MIME::Base64::decode_base64($auth), 2), $config); } else { # realm oriented - $request->push_handlers(PerlAuthenHandler => sub { return WebGUI::authen($request, undef, undef, $config)}); + $request->push_handlers(PerlAuthenHandler => sub { return WebGUI::authen($request, undef, undef, $config)}); }