Merge enabling PARAM_LOCALURL for clean_param() from HEAD (SC#54).
This commit is contained in:
+14
-16
@@ -43,19 +43,19 @@ define('NOGROUPS', 0);
|
||||
define('SEPARATEGROUPS', 1);
|
||||
define('VISIBLEGROUPS', 2);
|
||||
|
||||
define('PARAM_RAW', 0x00);
|
||||
define('PARAM_CLEAN', 0x01);
|
||||
define('PARAM_INT', 0x02);
|
||||
define('PARAM_INTEGER', 0x02); // Alias for PARAM_INT
|
||||
define('PARAM_ALPHA', 0x04);
|
||||
define('PARAM_ACTION', 0x04); // Alias for PARAM_ALPHA
|
||||
define('PARAM_FORMAT', 0x04); // Alias for PARAM_ALPHA
|
||||
define('PARAM_NOTAGS', 0x08);
|
||||
define('PARAM_FILE', 0x10);
|
||||
define('PARAM_PATH', 0x20);
|
||||
define('PARAM_HOST', 0x40); // FQDN or IPv4 dotted quad
|
||||
define('PARAM_URL', 0x80);
|
||||
//define('PARAM_LOCALURL',????); // need something that implies PARAM_URL
|
||||
define('PARAM_RAW', 0x0000);
|
||||
define('PARAM_CLEAN', 0x0001);
|
||||
define('PARAM_INT', 0x0002);
|
||||
define('PARAM_INTEGER', 0x0002); // Alias for PARAM_INT
|
||||
define('PARAM_ALPHA', 0x0004);
|
||||
define('PARAM_ACTION', 0x0004); // Alias for PARAM_ALPHA
|
||||
define('PARAM_FORMAT', 0x0004); // Alias for PARAM_ALPHA
|
||||
define('PARAM_NOTAGS', 0x0008);
|
||||
define('PARAM_FILE', 0x0010);
|
||||
define('PARAM_PATH', 0x0020);
|
||||
define('PARAM_HOST', 0x0040); // FQDN or IPv4 dotted quad
|
||||
define('PARAM_URL', 0x0080);
|
||||
define('PARAM_LOCALURL',0x0180); // NOT orthogonal to the others! Implies PARAM_URL!
|
||||
|
||||
/// PARAMETER HANDLING ////////////////////////////////////////////////////
|
||||
|
||||
@@ -190,8 +190,7 @@ function clean_param($param, $options) {
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
if ($options & PARAM_LOCALURL) {
|
||||
if ($options & PARAM_LOCALURL) {
|
||||
// assume we passed the PARAM_URL test...
|
||||
// allow http absolute, root relative and relative URLs within wwwroot
|
||||
if (!empty($param)) {
|
||||
@@ -209,7 +208,6 @@ function clean_param($param, $options) {
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
return $param;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user