From 973faa1a8362362d0049025a9b2e405e2fb29b82 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Tue, 20 Aug 2019 14:48:03 +0200 Subject: add patch for 7.4 from https://github.com/sabre-io/http/pull/121 --- php-sabre-http5-php74.patch | 23 +++++++++++++++++++++++ php-sabre-http5.spec | 9 ++++++++- 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 php-sabre-http5-php74.patch diff --git a/php-sabre-http5-php74.patch b/php-sabre-http5-php74.patch new file mode 100644 index 0000000..5e41957 --- /dev/null +++ b/php-sabre-http5-php74.patch @@ -0,0 +1,23 @@ +diff -up ./lib/Auth/Digest.php.up ./lib/Auth/Digest.php +--- ./lib/Auth/Digest.php.up 2019-08-20 14:37:51.705235293 +0200 ++++ ./lib/Auth/Digest.php 2019-08-20 14:38:29.371438395 +0200 +@@ -118,7 +118,7 @@ class Digest extends AbstractAuth { + */ + function getUsername() { + +- return $this->digestParts['username']; ++ return $this->digestParts['username'] ?? null; + + } + +@@ -127,6 +127,10 @@ class Digest extends AbstractAuth { + */ + protected function validate() : bool { + ++ if (!is_array($this->digestParts)) { ++ return false; ++ } ++ + $A2 = $this->request->getMethod() . ':' . $this->digestParts['uri']; + + if ($this->digestParts['qop'] == 'auth-int') { diff --git a/php-sabre-http5.spec b/php-sabre-http5.spec index e785549..250f2c7 100644 --- a/php-sabre-http5.spec +++ b/php-sabre-http5.spec @@ -23,12 +23,14 @@ Name: php-%{pk_vendor}-%{pk_project}%{major} Summary: Library for dealing with http requests and responses Version: 5.0.0 -Release: 2%{?dist} +Release: 3%{?dist} URL: https://github.com/%{gh_owner}/%{gh_project} License: BSD Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{name}-%{version}-%{gh_short}.tar.gz +Patch0: %{name}-php74.patch + BuildArch: noarch %if %{with_tests} BuildRequires: php(language) >= 7.0 @@ -121,6 +123,7 @@ Autoloader: %{_datadir}/php/%{ns_vendor}/%{ns_project}%{major}/autoload.php %prep %setup -q -n %{gh_project}-%{gh_commit} +%patch0 -p1 phpab -t fedora -o lib/autoload.php lib cat << 'EOF' | tee -a lib/autoload.php @@ -177,6 +180,10 @@ exit $ret %changelog +* Tue Aug 20 2019 Remi Collet - 5.0.0-3 +- add patch for 7.4 from + https://github.com/sabre-io/http/pull/121 + * Fri Jul 5 2019 Remi Collet - 5.0.0-2 - fix autoloader -- cgit