From 33201ec1d2c29ea2c2680c7560af79e4ff35489f Mon Sep 17 00:00:00 2001 From: ctrlaltca Date: Sat, 18 Apr 2026 03:00:02 +0200 Subject: [PATCH] Correctly urlencode path in setcookie(); fix Studio-42#3538 (#3754) Some characters are valid in URLs but not in cookies, eg. comma or semicolon. They needs to be encoded properly. --- php/elFinder.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/php/elFinder.class.php b/php/elFinder.class.php index 7e976a312..ab1148d3f 100644 --- a/php/elFinder.class.php +++ b/php/elFinder.class.php @@ -2087,7 +2087,7 @@ class elFinder } if ($args['cpath'] && $args['reqid']) { - setcookie('elfdl' . $args['reqid'], '1', 0, $args['cpath']); + setcookie('elfdl' . $args['reqid'], '1', 0, urlencode($args['cpath'])); } $result = array(