From 5f0ee6d95eab5e67d25a3b891fdced0f250b06ee Mon Sep 17 00:00:00 2001 From: Matt Pass Date: Fri, 10 May 2013 17:41:37 +0100 Subject: [PATCH] Trim + and space from end of file Not something that should/could be used consistently across enviro's so am trimming these chars off --- lib/file-control.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/file-control.php b/lib/file-control.php index 76a02a7..9bc677e 100644 --- a/lib/file-control.php +++ b/lib/file-control.php @@ -10,6 +10,9 @@ $file = str_replace("|","/",strClean( : $_GET['file'] )); +// Trim any +'s or spaces from the end of file +$file = rtrim(rtrim($file,'+'),' '); + // Make $file a full path and establish the $fileLoc and $fileName if (strpos($file,$docRoot)===false) {$file=str_replace("|","/",$docRoot.$iceRoot.$file);}; $fileLoc = substr(str_replace($docRoot,"",$file),0,strrpos(str_replace($docRoot,"",$file),"/"));