Alexander Nicolaysen Sørnes : filter: Clear whitespace for input numbers
Chris Morgan
cmorgan at winehq.org
Mon Jul 7 21:12:12 CDT 2008
Module: appdb
Branch: master
Commit: 017d2d68a0b202baac41f83bd1d661faba2651f7
URL: http://source.winehq.org/git/appdb.git/?a=commit;h=017d2d68a0b202baac41f83bd1d661faba2651f7
Author: Alexander Nicolaysen Sørnes <alex at thehandofagony.com>
Date: Sun Jul 6 16:19:59 2008 +0200
filter: Clear whitespace for input numbers
---
include/filter.php | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/include/filter.php b/include/filter.php
index 439e4e3..4daf875 100644
--- a/include/filter.php
+++ b/include/filter.php
@@ -66,6 +66,8 @@ function filter_gpc()
$aClean[$aKeys[$i]] = $_REQUEST[$aKeys[$i]];
else if(empty($_REQUEST[$aKeys[$i]]))
$aClean[$aKeys[$i]] = 0;
+ else if(is_numeric(trim($_REQUEST[$aKeys[$i]]))) // try clearing whitespace
+ $aClean[$aKeys[$i]] = trim($_REQUEST[$aKeys[$i]]);
else
return "Fatal error: ".$aKeys[$i]." should be a numeric value. ".
$sErrorSuggestion;
More information about the wine-cvs
mailing list