|
From: Markus P. <mar...@us...> - 2005-04-10 13:16:03
|
Update of /cvsroot/mxbb/core/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv786 Modified Files: mx_functions.php Log Message: Fixed mx_request_vars class: fix MX_TYPE_NO_SQL condition and replace its name with MX_TYPE_SQL_QUOTED, which makes more sense. Thanks jaime ;-) Index: mx_functions.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions.php,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** mx_functions.php 3 Apr 2005 14:30:26 -0000 1.32 --- mx_functions.php 10 Apr 2005 13:15:27 -0000 1.33 *************** *** 1129,1133 **** define('MX_TYPE_NO_TAGS' , 8); // Be sure we get a request var of type STRING (strip_tags + htmlspecialchars). define('MX_TYPE_NO_STRIP' , 16); // By default strings are slash stripped, this flag avoids this. ! define('MX_TYPE_NO_SQL' , 32); // Be sure we get a request var of type STRING, safe for SQL statements (single quotes escaped) define('MX_TYPE_POST_VARS' , 64); // Read a POST variable. define('MX_TYPE_GET_VARS' , 128); // Read a GET variable. --- 1129,1133 ---- define('MX_TYPE_NO_TAGS' , 8); // Be sure we get a request var of type STRING (strip_tags + htmlspecialchars). define('MX_TYPE_NO_STRIP' , 16); // By default strings are slash stripped, this flag avoids this. ! define('MX_TYPE_SQL_QUOTED' , 32); // Be sure we get a request var of type STRING, safe for SQL statements (single quotes escaped) define('MX_TYPE_POST_VARS' , 64); // Read a POST variable. define('MX_TYPE_GET_VARS' , 128); // Read a GET variable. *************** *** 1138,1142 **** // More than one flag can specified by OR'ing the $type argument. Examples: // For instance, we could use ( MX_TYPE_POST_VARS | MX_TYPE_GET_VARS ), see method request(). ! // or we could use ( MX_TYPE_NO_TAGS | MX_TYPE_NO_SQL ). // However, MX_TYPE_NO_HTML and MX_TYPE_NO_TAGS can't be specified at a time (defaults to MX_TYPE_NO_TAGS which is more restritive). // Also, MX_TYPE_INT and MX_TYPE_FLOAT ignore flags MX_TYPE_NO_* --- 1138,1142 ---- // More than one flag can specified by OR'ing the $type argument. Examples: // For instance, we could use ( MX_TYPE_POST_VARS | MX_TYPE_GET_VARS ), see method request(). ! // or we could use ( MX_TYPE_NO_TAGS | MX_TYPE_SQL_QUOTED ). // However, MX_TYPE_NO_HTML and MX_TYPE_NO_TAGS can't be specified at a time (defaults to MX_TYPE_NO_TAGS which is more restritive). // Also, MX_TYPE_INT and MX_TYPE_FLOAT ignore flags MX_TYPE_NO_* *************** *** 1255,1259 **** } } ! if( !($type & MX_TYPE_NO_SQL) ) { if( is_array($val) ) --- 1255,1259 ---- } } ! if( $type & MX_TYPE_SQL_QUOTED ) { if( is_array($val) ) |