From 82762809af977be0a52fb2f6843b43ca042f0df0 Mon Sep 17 00:00:00 2001
From: Marius Burkard <m.burkard@pixcept.de>
Date: Fri, 23 Oct 2020 13:58:54 +0200
Subject: [PATCH] Apply 1 suggestion(s) to 1 file(s)

---
 server/lib/classes/system.inc.php | 1 +
 1 file changed, 1 insertion(+)

diff --git a/server/lib/classes/system.inc.php b/server/lib/classes/system.inc.php
index 20bdd08bc7..b19cc1d566 100644
--- a/server/lib/classes/system.inc.php
+++ b/server/lib/classes/system.inc.php
@@ -2744,6 +2744,7 @@ $app->log("delete_jailkit_chroot called for $home_dir with options ".print_r($op
 			switch ($opt) {
 			default:
 				if (preg_match('@^skip[ =]/?(.+)$@', $opt, $matches) ) {
+					$matches[1] = ltrim($matches[1], '/');
 					if (in_array($matches[1], $jailkit_directories)) {
 						$app->log("delete_jailkit_chroot: skipping removal of jailkit directory .$home_dir/".$matches[1]
 							. "; if this is in use as a web folder, it is insecure and should be fixed.", LOGLEVEL_WARN);
-- 
GitLab