Skip to content
This repository
Browse code

Merge branch 'release-2.2' into develop

* release-2.2:
  Bump version for 2.2.4-pl release
  [#8105], [#8051] Fix modFileHandler::sanitizePath() infinite recursion
  [#8051] Fix issue that caused breakage in modFileMediaSource

Conflicts:
	_build/build.sample.properties
	_build/build.xml
	core/docs/changelog.txt
	core/docs/version.inc.php
  • Loading branch information...
commit 48a3d466a2257f47a6212d2d220640c7f8a8967e 2 parents a77df56 + f95765d
Jason Coward opengeek authored
4 core/docs/changelog.txt
@@ -6,6 +6,10 @@ development release, and is only shown to give an idea of what's currently in th
6 6 - Allow Namespace-based loading of custom TV files
7 7 - Deprecate usage of modAction objects in favor of modNamespace base controller path
8 8
  9 +MODX Revolution 2.2.4-pl (June 14, 2012)
  10 +====================================
  11 +- [#8105], [#8051] Fix modFileHandler::sanitizePath() infinite recursion
  12 +
9 13 MODX Revolution 2.2.3-pl (June 13, 2012)
10 14 ====================================
11 15 - Add setting to be able to set default context for new Resources
8 core/model/modx/modfilehandler.class.php
@@ -111,13 +111,7 @@ public function getBaseUrl() {
111 111 * @return string The sanitized path
112 112 */
113 113 public function sanitizePath($path) {
114   - $replace = array('../' => '', './' => '', '\\' => '/', '//' => '/');
115   - foreach ($replace as $from => $to) {
116   - while (stristr($from,$path)) {
117   - $path = str_replace($from,$to,$path);
118   - }
119   - }
120   - return $path;
  114 + return preg_replace(array('/\.*[\/|\\\]/i', '/[\/|\\\]+/i'), array('/', '/'), $path);
121 115 }
122 116
123 117 /**

0 comments on commit 48a3d46

Please sign in to comment.
Something went wrong with that request. Please try again.