SOURCES: lighttpd-branch.diff - update to @2026: fixed case-sensit...

glen glen at pld-linux.org
Tue Jan 15 22:43:04 CET 2008


Author: glen                         Date: Tue Jan 15 21:43:04 2008 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- update to @2026: fixed case-sensitive check for Auth-Method (#1456)

---- Files affected:
SOURCES:
   lighttpd-branch.diff (1.23 -> 1.24) 

---- Diffs:

================================================================
Index: SOURCES/lighttpd-branch.diff
diff -u SOURCES/lighttpd-branch.diff:1.23 SOURCES/lighttpd-branch.diff:1.24
--- SOURCES/lighttpd-branch.diff:1.23	Mon Nov 12 17:18:53 2007
+++ SOURCES/lighttpd-branch.diff	Tue Jan 15 22:42:58 2008
@@ -1,7 +1,7 @@
 Index: src/configfile-glue.c
 ===================================================================
---- src/configfile-glue.c	(.../tags/lighttpd-1.4.18)	(revision 2025)
-+++ src/configfile-glue.c	(.../branches/lighttpd-1.4.x)	(revision 2025)
+--- src/configfile-glue.c	(.../tags/lighttpd-1.4.18)	(revision 2026)
++++ src/configfile-glue.c	(.../branches/lighttpd-1.4.x)	(revision 2026)
 @@ -341,6 +341,10 @@
  		}
  		break;
@@ -15,8 +15,8 @@
  		break;
 Index: src/array.h
 ===================================================================
---- src/array.h	(.../tags/lighttpd-1.4.18)	(revision 2025)
-+++ src/array.h	(.../branches/lighttpd-1.4.x)	(revision 2025)
+--- src/array.h	(.../tags/lighttpd-1.4.18)	(revision 2026)
++++ src/array.h	(.../branches/lighttpd-1.4.x)	(revision 2026)
 @@ -90,6 +90,7 @@
  	COMP_HTTP_COOKIE,
  	COMP_HTTP_REMOTEIP,
@@ -27,8 +27,8 @@
  } comp_key_t;
 Index: src/mod_staticfile.c
 ===================================================================
---- src/mod_staticfile.c	(.../tags/lighttpd-1.4.18)	(revision 2025)
-+++ src/mod_staticfile.c	(.../branches/lighttpd-1.4.x)	(revision 2025)
+--- src/mod_staticfile.c	(.../tags/lighttpd-1.4.18)	(revision 2026)
++++ src/mod_staticfile.c	(.../branches/lighttpd-1.4.x)	(revision 2026)
 @@ -483,8 +483,24 @@
  			/* if the value is the same as our ETag, we do a Range-request,
  			 * otherwise a full 200 */
@@ -57,8 +57,8 @@
  
 Index: src/response.c
 ===================================================================
---- src/response.c	(.../tags/lighttpd-1.4.18)	(revision 2025)
-+++ src/response.c	(.../branches/lighttpd-1.4.x)	(revision 2025)
+--- src/response.c	(.../tags/lighttpd-1.4.18)	(revision 2026)
++++ src/response.c	(.../branches/lighttpd-1.4.x)	(revision 2026)
 @@ -180,6 +180,7 @@
  		buffer_copy_string_buffer(con->uri.authority, con->request.http_host);
  		buffer_to_lower(con->uri.authority);
@@ -69,8 +69,8 @@
  		config_patch_connection(srv, con, COMP_HTTP_REFERER);   /* Referer:     */
 Index: src/configparser.y
 ===================================================================
---- src/configparser.y	(.../tags/lighttpd-1.4.18)	(revision 2025)
-+++ src/configparser.y	(.../branches/lighttpd-1.4.x)	(revision 2025)
+--- src/configparser.y	(.../tags/lighttpd-1.4.18)	(revision 2026)
++++ src/configparser.y	(.../branches/lighttpd-1.4.x)	(revision 2026)
 @@ -422,6 +422,7 @@
        { COMP_HTTP_COOKIE,        CONST_STR_LEN("HTTP[\"cookie\"]"     ) },
        { COMP_HTTP_REMOTEIP,      CONST_STR_LEN("HTTP[\"remoteip\"]"   ) },
@@ -81,8 +81,8 @@
      size_t i;
 Index: src/spawn-fcgi.c
 ===================================================================
---- src/spawn-fcgi.c	(.../tags/lighttpd-1.4.18)	(revision 2025)
-+++ src/spawn-fcgi.c	(.../branches/lighttpd-1.4.x)	(revision 2025)
+--- src/spawn-fcgi.c	(.../tags/lighttpd-1.4.18)	(revision 2026)
++++ src/spawn-fcgi.c	(.../branches/lighttpd-1.4.x)	(revision 2026)
 @@ -37,7 +37,7 @@
  #endif
  
@@ -214,10 +214,30 @@
  }
  #else
  int main() {
+Index: src/mod_auth.c
+===================================================================
+--- src/mod_auth.c	(.../tags/lighttpd-1.4.18)	(revision 2026)
++++ src/mod_auth.c	(.../branches/lighttpd-1.4.x)	(revision 2026)
+@@ -238,13 +238,13 @@
+ 			int auth_type_len = auth_realm - http_authorization;
+ 
+ 			if ((auth_type_len == 5) &&
+-			    (0 == strncmp(http_authorization, "Basic", auth_type_len))) {
++			    (0 == strncasecmp(http_authorization, "Basic", auth_type_len))) {
+ 
+ 				if (0 == strcmp(method->value->ptr, "basic")) {
+ 					auth_satisfied = http_auth_basic_check(srv, con, p, req, con->uri.path, auth_realm+1);
+ 				}
+ 			} else if ((auth_type_len == 6) &&
+-				   (0 == strncmp(http_authorization, "Digest", auth_type_len))) {
++				   (0 == strncasecmp(http_authorization, "Digest", auth_type_len))) {
+ 				if (0 == strcmp(method->value->ptr, "digest")) {
+ 					if (-1 == (auth_satisfied = http_auth_digest_check(srv, con, p, req, con->uri.path, auth_realm+1))) {
+ 						con->http_status = 400;
 Index: src/server.c
 ===================================================================
---- src/server.c	(.../tags/lighttpd-1.4.18)	(revision 2025)
-+++ src/server.c	(.../branches/lighttpd-1.4.x)	(revision 2025)
+--- src/server.c	(.../tags/lighttpd-1.4.18)	(revision 2026)
++++ src/server.c	(.../branches/lighttpd-1.4.x)	(revision 2026)
 @@ -759,6 +759,19 @@
  
  			return -1;
@@ -254,10 +274,40 @@
  			setuid(pwd->pw_uid);
  		}
  #endif
+Index: tests/mod-auth.t
+===================================================================
+--- tests/mod-auth.t	(.../tags/lighttpd-1.4.18)	(revision 2026)
++++ tests/mod-auth.t	(.../branches/lighttpd-1.4.x)	(revision 2026)
+@@ -8,7 +8,7 @@
+ 
+ use strict;
+ use IO::Socket;
+-use Test::More tests => 13;
++use Test::More tests => 14;
+ use LightyTest;
+ 
+ my $tf = LightyTest->new();
+@@ -48,6 +48,16 @@
+ $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ];
+ ok($tf->handle_http($t) == 0, 'Basic-Auth: Valid Auth-token - htpasswd (des)');
+ 
++$t->{REQUEST}  = ( <<EOF
++GET /server-config HTTP/1.0
++Host: auth-htpasswd.example.org
++Authorization: basic ZGVzOmRlcw==
++EOF
++ );
++$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ];
++ok($tf->handle_http($t) == 0, 'Basic-Auth: Valid Auth-token - htpasswd (des) (lowercase)');
++
++
+ SKIP: {
+ 	skip "no md5 for crypt under cygwin", 1 if $^O eq 'cygwin';
+ $t->{REQUEST}  = ( <<EOF
 Index: doc/configuration.txt
 ===================================================================
---- doc/configuration.txt	(.../tags/lighttpd-1.4.18)	(revision 2025)
-+++ doc/configuration.txt	(.../branches/lighttpd-1.4.x)	(revision 2025)
+--- doc/configuration.txt	(.../tags/lighttpd-1.4.18)	(revision 2026)
++++ doc/configuration.txt	(.../branches/lighttpd-1.4.x)	(revision 2026)
 @@ -85,6 +85,8 @@
  
  $HTTP["cookie"]
@@ -269,8 +319,8 @@
  $HTTP["useragent"]
 Index: Makefile.am
 ===================================================================
---- Makefile.am	(.../tags/lighttpd-1.4.18)	(revision 2025)
-+++ Makefile.am	(.../branches/lighttpd-1.4.x)	(revision 2025)
+--- Makefile.am	(.../tags/lighttpd-1.4.18)	(revision 2026)
++++ Makefile.am	(.../branches/lighttpd-1.4.x)	(revision 2026)
 @@ -1,3 +1,3 @@
  SUBDIRS=src doc tests cygwin openwrt
  
@@ -278,9 +328,9 @@
 +EXTRA_DIST=lighttpd.spec SConstruct
 Index: NEWS
 ===================================================================
---- NEWS	(.../tags/lighttpd-1.4.18)	(revision 2025)
-+++ NEWS	(.../branches/lighttpd-1.4.x)	(revision 2025)
-@@ -3,6 +3,13 @@
+--- NEWS	(.../tags/lighttpd-1.4.18)	(revision 2026)
++++ NEWS	(.../branches/lighttpd-1.4.x)	(revision 2026)
+@@ -3,6 +3,14 @@
  NEWS
  ====
  
@@ -289,6 +339,7 @@
 +  * added support for If-Range: <date> (#1346)
 +  * added support for matching $HTTP["scheme"] in configs
 +  * fixed initgroups() called after chroot (#1384)
++  * fixed case-sensitive check for Auth-Method (#1456)
 +  * execute fcgi app without /bin/sh if used as argument to spawn-fcgi (#1428)
 +
  - 1.4.18 - 2007-09-09
@@ -296,8 +347,8 @@
    * fixed compile error on IRIX 6.5.x on prctl() (#1333)
 Index: lighttpd.spec.in
 ===================================================================
---- lighttpd.spec.in	(.../tags/lighttpd-1.4.18)	(revision 2025)
-+++ lighttpd.spec.in	(.../branches/lighttpd-1.4.x)	(revision 2025)
+--- lighttpd.spec.in	(.../tags/lighttpd-1.4.18)	(revision 2026)
++++ lighttpd.spec.in	(.../branches/lighttpd-1.4.x)	(revision 2026)
 @@ -6,21 +6,19 @@
  Packager: Jan Kneschke <jan at kneschke.de>
  License: BSD
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/lighttpd-branch.diff?r1=1.23&r2=1.24&f=u



More information about the pld-cvs-commit mailing list