Skip to content

Commit 66485d8

Browse files
committed
Correctly urlencode path in setcookie(); fix #3538
Some characters are valid in URLs but not in cookies, eg. comma or semicolon. They needs to be encoded properly.
1 parent d2ce4bd commit 66485d8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

php/elFinder.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2087,7 +2087,7 @@ protected function file($args)
20872087
}
20882088

20892089
if ($args['cpath'] && $args['reqid']) {
2090-
setcookie('elfdl' . $args['reqid'], '1', 0, $args['cpath']);
2090+
setcookie('elfdl' . $args['reqid'], '1', 0, urlencode($args['cpath']));
20912091
}
20922092

20932093
$result = array(

0 commit comments

Comments
 (0)