Changeset 2026
- Timestamp:
- 11/23/2007 03:23:35 PM (8 months ago)
- Files:
-
- branches/lighttpd-1.4.x/NEWS (modified) (1 diff)
- branches/lighttpd-1.4.x/src/mod_auth.c (modified) (2 diffs)
- branches/lighttpd-1.4.x/tests/mod-auth.t (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/lighttpd-1.4.x/NEWS
r2024 r2026 9 9 * added support for matching $HTTP["scheme"] in configs 10 10 * fixed initgroups() called after chroot (#1384) 11 * fixed case-sensitive check for Auth-Method (#1456) 11 12 * execute fcgi app without /bin/sh if used as argument to spawn-fcgi (#1428) 12 13 branches/lighttpd-1.4.x/src/mod_auth.c
r1938 r2026 239 239 240 240 if ((auth_type_len == 5) && 241 (0 == strnc mp(http_authorization, "Basic", auth_type_len))) {241 (0 == strncasecmp(http_authorization, "Basic", auth_type_len))) { 242 242 243 243 if (0 == strcmp(method->value->ptr, "basic")) { … … 245 245 } 246 246 } else if ((auth_type_len == 6) && 247 (0 == strnc mp(http_authorization, "Digest", auth_type_len))) {247 (0 == strncasecmp(http_authorization, "Digest", auth_type_len))) { 248 248 if (0 == strcmp(method->value->ptr, "digest")) { 249 249 if (-1 == (auth_satisfied = http_auth_digest_check(srv, con, p, req, con->uri.path, auth_realm+1))) { branches/lighttpd-1.4.x/tests/mod-auth.t
r1875 r2026 9 9 use strict; 10 10 use IO::Socket; 11 use Test::More tests => 1 3;11 use Test::More tests => 14; 12 12 use LightyTest; 13 13 … … 48 48 $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ]; 49 49 ok($tf->handle_http($t) == 0, 'Basic-Auth: Valid Auth-token - htpasswd (des)'); 50 51 $t->{REQUEST} = ( <<EOF 52 GET /server-config HTTP/1.0 53 Host: auth-htpasswd.example.org 54 Authorization: basic ZGVzOmRlcw== 55 EOF 56 ); 57 $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ]; 58 ok($tf->handle_http($t) == 0, 'Basic-Auth: Valid Auth-token - htpasswd (des) (lowercase)'); 59 50 60 51 61 SKIP: {

