From 37dcb14ad37110100ae8be6758a6b40bd75caacc Mon Sep 17 00:00:00 2001 From: Ralf Lang Date: Fri, 12 Jan 2024 21:09:10 +0100 Subject: [PATCH] Fix deprecation warning reported by Andreas Mauser. --- doc/Horde/Core/changelog.yml | 5 +++-- lib/Horde.php | 4 ++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/doc/Horde/Core/changelog.yml b/doc/Horde/Core/changelog.yml index c93cda49..a5ea060c 100644 --- a/doc/Horde/Core/changelog.yml +++ b/doc/Horde/Core/changelog.yml @@ -8,8 +8,9 @@ license: identifier: LGPL-2.1 uri: http://www.horde.org/licenses/lgpl21 - notes: |+ - + notes: | + [rla] Fix deprecation warning with strrpos reported on mailing list by Andreas Mauser. + |+ 3.0.0alpha16: api: 3.0.0alpha6 state: diff --git a/lib/Horde.php b/lib/Horde.php index 861d3cd3..d35faad4 100644 --- a/lib/Horde.php +++ b/lib/Horde.php @@ -218,6 +218,10 @@ public static function verifySignedUrl($data, $now = null) $now = time(); } + if (!is_string($data)) { + return false; + } + $pos = strrpos($data, '&_h='); if ($pos === false) { return false;