From 82e8106b71171745c4886bb481033c0d270c570c Mon Sep 17 00:00:00 2001 From: Pierre HUBERT Date: Sat, 14 Jul 2018 11:10:57 +0200 Subject: [PATCH] Made checkUserDirectoryValidity generic --- functions/requests.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/functions/requests.php b/functions/requests.php index 279f52c..fc71da3 100644 --- a/functions/requests.php +++ b/functions/requests.php @@ -528,7 +528,7 @@ function save_post_image(string $fieldName, int $userID, string $folder, int $ma * @param string $directory The directory to check * @return bool TRUE if the domain seems to be valid / FALSE else */ -function checkUserDirectoryValidity(string $directory) : bool { +function checkVirtualDirectoryValidity(string $directory) : bool { //Check domain length if(strlen($directory) < 4) @@ -557,7 +557,7 @@ function getPostUserDirectory(string $name) : string { $directory = (string) $_POST[$name]; //Check domain validity - if(!checkUserDirectoryValidity($directory)) + if(!checkVirtualDirectoryValidity($directory)) Rest_fatal_error(401, "Specified directory seems to be invalid!"); //Return the directory