mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-08-29 18:26:05 +00:00
Ensure incoming URLs are decoded before we process them.
This commit is contained in:
parent
950a770450
commit
989cc98b52
@ -186,7 +186,12 @@ class CalDAVRequest
|
||||
* the minimum privileges returned from that analysis.
|
||||
*/
|
||||
$this->path = (isset($_SERVER['PATH_INFO']) ? $_SERVER['PATH_INFO'] : "");
|
||||
if ( $this->path == null || $this->path == '' ) $this->path = '/';
|
||||
if ( $this->path == null || $this->path == '' ) {
|
||||
$this->path = '/';
|
||||
}
|
||||
else {
|
||||
$this->path = rawurldecode($this->path);
|
||||
}
|
||||
// dbg_error_log( "caldav", "Sanitising path '%s'", $this->path );
|
||||
$bad_chars_regex = '/[\\^\\[\\(\\\\]/';
|
||||
if ( preg_match( $bad_chars_regex, $this->path ) ) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user