[packages/dokuwiki/dev-2023-04-04: 8/9] Allow lowercase authorization header

glen glen at pld-linux.org
Sat Apr 29 00:05:15 CEST 2023


commit 57eb0ff5b9a91c1155839ff7ce3b0755c0de08c8
Author: Elan Ruusamäe <glen at pld-linux.org>
Date:   Sat Apr 29 00:54:42 2023 +0300

    Allow lowercase authorization header

 dokuwiki.spec                    |  2 ++
 tokenauth-lowercase-header.patch | 10 ++++++++++
 2 files changed, 12 insertions(+)
---
diff --git a/dokuwiki.spec b/dokuwiki.spec
index 1521337..737444a 100644
--- a/dokuwiki.spec
+++ b/dokuwiki.spec
@@ -44,6 +44,7 @@ Patch24:	more-buttons.patch
 Patch27:	iconsizes-dump.patch
 Patch28:	https://github.com/dokuwiki/dokuwiki/pull/2432.diff
 # Patch28-md5:	5afbddfdd2b5c3a72377ead41da555af
+Patch29:	tokenauth-lowercase-header.patch
 URL:		https://www.dokuwiki.org/
 BuildRequires:	fslint
 BuildRequires:	rpm-php-pearprov >= 4.4.2-11
@@ -137,6 +138,7 @@ echo '====== PlayGround ======' >  data/pages/playground/playground.txt
 #%patch24 -p1
 %patch27 -p1
 %patch28 -p1
+%patch29 -p1
 %patch66 -p1
 
 # package as basenames, upgrade overwrite protected with .rpmnew
diff --git a/tokenauth-lowercase-header.patch b/tokenauth-lowercase-header.patch
new file mode 100644
index 0000000..b835e2b
--- /dev/null
+++ b/tokenauth-lowercase-header.patch
@@ -0,0 +1,10 @@
+--- dokuwiki-2023-04-04/inc/auth.php~	2023-04-28 23:43:03.000000000 +0300
++++ dokuwiki-2023-04-04/inc/auth.php	2023-04-29 00:53:43.324078441 +0300
+@@ -177,6 +177,7 @@
+         // Authorization headers are not in $_SERVER for mod_php
+         $headers = apache_request_headers();
+         if(isset($headers['Authorization'])) $header = $headers['Authorization'];
++        if(!$header && isset($headers['authorization'])) $header = $headers['authorization'];
+     } else {
+         $header = $INPUT->server->str('HTTP_AUTHORIZATION');
+     }
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/dokuwiki.git/commitdiff/270ed101a49f8380b85b74e94b8c831cf6db5b19



More information about the pld-cvs-commit mailing list