mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-05-23 02:14:16 +00:00
No need to use preg_split here, since PHP has already cleaned any paired
slashes down to singletons.
This commit is contained in:
parent
73e7f73f2a
commit
ef6785f31e
@ -95,6 +95,7 @@ class CalDAVRequest
|
|||||||
* the minimum privileges returned from that analysis.
|
* the minimum privileges returned from that analysis.
|
||||||
*/
|
*/
|
||||||
$this->path = $_SERVER['PATH_INFO'];
|
$this->path = $_SERVER['PATH_INFO'];
|
||||||
|
// dbg_error_log( "caldav", "Sanitising path '%s'", $this->path );
|
||||||
$bad_chars_regex = '/[\\^\\[\\(\\\\]/';
|
$bad_chars_regex = '/[\\^\\[\\(\\\\]/';
|
||||||
if ( preg_match( $bad_chars_regex, $this->path ) ) {
|
if ( preg_match( $bad_chars_regex, $this->path ) ) {
|
||||||
$this->DoResponse( 400, translate("The calendar path contains illegal characters.") );
|
$this->DoResponse( 400, translate("The calendar path contains illegal characters.") );
|
||||||
@ -115,7 +116,7 @@ class CalDAVRequest
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$path_split = preg_split('#/+#', $this->path );
|
$path_split = explode('/', $this->path );
|
||||||
$this->permissions = array();
|
$this->permissions = array();
|
||||||
if ( !isset($path_split[1]) || $path_split[1] == '' ) {
|
if ( !isset($path_split[1]) || $path_split[1] == '' ) {
|
||||||
dbg_error_log( "caldav", "No useful path split possible" );
|
dbg_error_log( "caldav", "No useful path split possible" );
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user