Skip to content

Commit

Permalink
Correctly urlencode path in setcookie(); fix #3538 (#3561)
Browse files Browse the repository at this point in the history
Some characters are valid in URLs but not in cookies, eg. comma or semicolon.
They needs to be encoded properly.
  • Loading branch information
ctrlaltca authored Jun 2, 2023
1 parent ca888c1 commit 34dcd44
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion php/elFinder.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -2082,7 +2082,7 @@ protected function file($args)
}

if ($args['cpath'] && $args['reqid']) {
setcookie('elfdl' . $args['reqid'], '1', 0, $args['cpath']);
setcookie('elfdl' . $args['reqid'], '1', 0, urlencode($args['cpath']));
}

$result = array(
Expand Down

0 comments on commit 34dcd44

Please sign in to comment.