mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-03-09 07:23:39 +00:00
Correctly test for repeated caldav.php in URL.
This commit is contained in:
parent
2c12586a42
commit
2f82e69cfb
@ -315,7 +315,7 @@ function ConstructURL( $partial_path, $force_script = false ) {
|
||||
$url = preg_replace( '#^(https?://.+)//#', '$1/', $url ); // Ensure we don't double any '/'
|
||||
$url = preg_replace('#^https?://[^/]+#', '', $url ); // Remove any protocol + hostname portion
|
||||
|
||||
if ( strstr($url, 'caldav.php/caldav.php') ) {
|
||||
if ( strstr($url, 'caldav.php/caldav.php') !== false ) {
|
||||
trace_bug('Duplicated caldav.php/ in URL "%s" from partial_path=%s, force_script=%s', $url, $partial_path, ($force_script?'true':'false'));
|
||||
$url = str_replace( 'caldav.php/caldav.php', 'caldav.php', $url ); // Ensure we don't double any 'caldav.php/'
|
||||
}
|
||||
|
||||
@ -315,7 +315,7 @@ function ConstructURL( $partial_path, $force_script = false ) {
|
||||
$url = preg_replace( '#^(https?://.+)//#', '$1/', $url ); // Ensure we don't double any '/'
|
||||
$url = preg_replace('#^https?://[^/]+#', '', $url ); // Remove any protocol + hostname portion
|
||||
|
||||
if ( strstr($url, 'caldav.php/caldav.php') ) {
|
||||
if ( strstr($url, 'caldav.php/caldav.php') !== false ) {
|
||||
trace_bug('Duplicated caldav.php/ in URL "%s" from partial_path=%s, force_script=%s', $url, $partial_path, ($force_script?'true':'false'));
|
||||
$url = str_replace( 'caldav.php/caldav.php', 'caldav.php', $url ); // Ensure we don't double any 'caldav.php/'
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user