From 93bd6073b1c2e3f23cb7770374a3e0d461f76b84 Mon Sep 17 00:00:00 2001 From: Florian Schlichting Date: Tue, 10 Jan 2017 22:04:30 +0100 Subject: [PATCH] creating a DAVResource from "/ " loops a lot --- htdocs/always.php | 1 + inc/always.php.in | 1 + 2 files changed, 2 insertions(+) diff --git a/htdocs/always.php b/htdocs/always.php index 2a31a08d..a8c872b0 100644 --- a/htdocs/always.php +++ b/htdocs/always.php @@ -380,6 +380,7 @@ function DeconstructURL( $url, $force_script = false ) { global $c; $dav_name = rawurldecode($url); + $dav_name = trim($dav_name); /** Allow a path like .../username/calendar.ics to translate into the calendar URL */ if ( preg_match( '#^(/[^/]+/[^/]+).ics$#', $dav_name, $matches ) ) { diff --git a/inc/always.php.in b/inc/always.php.in index 947878cb..b30fe6bd 100644 --- a/inc/always.php.in +++ b/inc/always.php.in @@ -380,6 +380,7 @@ function DeconstructURL( $url, $force_script = false ) { global $c; $dav_name = rawurldecode($url); + $dav_name = trim($dav_name); /** Allow a path like .../username/calendar.ics to translate into the calendar URL */ if ( preg_match( '#^(/[^/]+/[^/]+).ics$#', $dav_name, $matches ) ) {