diff --git a/ChangeLog b/ChangeLog index 001e9fa271..7877bcb3f6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -17,6 +17,7 @@ phpMyAdmin - ChangeLog - bug #4595 [security] Path traversal can lead to leakage of line count - bug #4578 [security] XSS vulnerability in table print view - bug #4579 [security] XSS vulnerability in zoom search page +- bug #4594 [security] Path traversal in file inclusion of GIS factory 4.2.11.0 (2014-10-31) - bug ReferenceError: Table_onover is not defined diff --git a/libraries/gis/GIS_Factory.class.php b/libraries/gis/GIS_Factory.class.php index b2d01c11a3..404a720085 100644 --- a/libraries/gis/GIS_Factory.class.php +++ b/libraries/gis/GIS_Factory.class.php @@ -33,7 +33,9 @@ class PMA_GIS_Factory include_once './libraries/gis/GIS_Geometry.class.php'; $type_lower = strtolower($type); - if (! file_exists('./libraries/gis/GIS_' . ucfirst($type_lower) . '.class.php')) { + if (! PMA_isValid($type_lower, PMA_Util::getGISDatatypes()) + || ! file_exists('./libraries/gis/GIS_' . ucfirst($type_lower) . '.class.php') + ) { return false; } if (include_once './libraries/gis/GIS_' . ucfirst($type_lower) . '.class.php') {