From 3db8ad3e4a046c0b775cc8948d0612b019a0a413 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Sat, 30 Jul 2016 09:02:07 +0200 Subject: [PATCH] String validation fix --- security/security_guidelines.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/security/security_guidelines.md b/security/security_guidelines.md index 65e8c02..a2da81e 100644 --- a/security/security_guidelines.md +++ b/security/security_guidelines.md @@ -131,7 +131,7 @@ if(($pathNew = realpath($path)) === false || strpos($pathNew, self::MODULE_PATH) The example throws an exception if the path either doesn't exist or is trying to access a path that doesn't contain the path defined in `self::MODULE_PATH`. Another validation could be: ``` -if(($pathNew = realpath($path)) === false || !Validator::startsWith($pathNew, ROOT_PATH)) { +if(($pathNew = realpath($path)) === false || !StringUtils::startsWith($pathNew, ROOT_PATH)) { throw new PathException($path); } ```