From 04123f08ebfe7620273af4b71219afb21946494c Mon Sep 17 00:00:00 2001 From: cassiopc Date: Thu, 25 Oct 2012 11:25:31 +0200 Subject: avoid namespaces in file names --- boca-1.5.2/src/team/run.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'boca-1.5.2/src') diff --git a/boca-1.5.2/src/team/run.php b/boca-1.5.2/src/team/run.php index 3879674..270a672 100644 --- a/boca-1.5.2/src/team/run.php +++ b/boca-1.5.2/src/team/run.php @@ -38,6 +38,10 @@ if (isset($_FILES["sourcefile"]) && isset($_POST["problem"]) && isset($_POST["Su MSGError("File size exceeds the limit allowed."); ForceLoad($runteam); } + if(strpos($name,' ') === true || strpos($temp,' ') === true) { + MSGError("File name cannot contain spaces."); + ForceLoad($runteam); + } if (!is_uploaded_file($temp) || strlen($name)>100) { IntrusionNotify("file upload problem."); ForceLoad("../index.php"); -- cgit v1.2.3