Browse code

prevent breaking kvhostcreator with long path names

Hanno authored on 17/08/2018 05:29:56
Showing 1 changed files
... ...
@@ -204,6 +204,12 @@ function check_path($input)
204 204
             DEBUG("»..« im Pfad");
205 205
             return false;
206 206
         }
207
+        if (strlen($item) > 255) {
208
+            return false;
209
+        }
210
+    }
211
+    if (strlen($input) > 2048) {
212
+        return false;
207 213
     }
208 214
     return (preg_match('/^[ A-Za-z0-9.@\/_-]*$/', $input) == 1);
209 215
 }