PM-3383 "0018219: No valida el src del campo image" SOLVED

Issue:
    0018219: No valida el src del campo image
Cause:
    URL invalida en el atributo "src" del tag <img>, esto ocasiona que se haga un "redirect" al login
Solution:
    Si la URL es invalida entonces se redirige a la pagina 404 "not found"
This commit is contained in:
Victor Saisa Lopez
2015-09-04 14:10:46 -04:00
parent 0ba4fb8d2d
commit 03dd440644

View File

@@ -672,13 +672,13 @@ class Bootstrap
{ {
Bootstrap::LoadSystem('inputfilter'); Bootstrap::LoadSystem('inputfilter');
$filter = new InputFilter(); $filter = new InputFilter();
$path = PATH_GULLIVER . 'class.' . $strClass . '.php'; $path = PATH_GULLIVER . 'class.' . $strClass . '.php';
$path = $filter->validateInput($path, "path"); $path = $filter->validateInput($path, "path");
$classfile = Bootstrap::ExpandPath("classes") . 'class.' . $strClass . '.php'; $classfile = Bootstrap::ExpandPath("classes") . 'class.' . $strClass . '.php';
$classfile = $filter->validateInput($classfile, "path"); $classfile = $filter->validateInput($classfile, "path");
if (!file_exists($classfile)) { if (!file_exists($classfile)) {
if (file_exists($path)) { if (file_exists($path)) {
return require_once ($path); return require_once ($path);
@@ -2130,14 +2130,19 @@ class Bootstrap
array_shift($uriVars); array_shift($uriVars);
$args = array(); $args = array();
$args['SYS_LANG'] = array_shift($uriVars);
$args['SYS_SKIN'] = array_shift($uriVars); $element = array_shift($uriVars);
$args['SYS_COLLECTION'] = array_shift($uriVars); $args["SYS_LANG"] = (preg_match("/^[\w\-]+$/", $element))? $element : "";
$args['SYS_TARGET'] = array_shift($uriVars);
$element = array_shift($uriVars);
$args["SYS_SKIN"] = (preg_match("/^[\w\-]+$/", $element))? $element : "";
$args["SYS_COLLECTION"] = array_shift($uriVars);
$args["SYS_TARGET"] = array_shift($uriVars);
//to enable more than 2 directories...in the methods structure //to enable more than 2 directories...in the methods structure
while (count($uriVars) > 0) { while (!empty($uriVars)) {
$args['SYS_TARGET'] .= '/' . array_shift($uriVars); $args["SYS_TARGET"] = $args["SYS_TARGET"] . "/" . array_shift($uriVars);
} }
/* Fix to prevent use uxs skin outside siplified interface, /* Fix to prevent use uxs skin outside siplified interface,
@@ -2942,3 +2947,4 @@ class Bootstrap
return md5($string); return md5($string);
} }
} }