From 1b4885d9e5352eb712792ada4825f9b2df3fc33c Mon Sep 17 00:00:00 2001 From: SintezCode Date: Tue, 2 May 2017 12:00:30 +0300 Subject: [PATCH 1/5] Update unpack.class.php Check for absolute/relative path to build target path. --- core/model/modx/processors/browser/file/unpack.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/model/modx/processors/browser/file/unpack.class.php b/core/model/modx/processors/browser/file/unpack.class.php index 661af4bd1d3..544e590594e 100644 --- a/core/model/modx/processors/browser/file/unpack.class.php +++ b/core/model/modx/processors/browser/file/unpack.class.php @@ -29,7 +29,8 @@ public function process() { $this->modx->getService('fileHandler', 'modFileHandler'); - $target = $this->modx->getOption('base_path') . $this->properties['path'] . $this->properties['file']; + $target = $this->properties['path'].$this->properties['file']; + if(strpos($target,'/')!==0)$target=$this->modx->getOption('base_path').$target;//if path relative add base_path $target = preg_replace('/[\.]{2,}/', '', htmlspecialchars($target)); $fileobj = $this->modx->fileHandler->make($target); From 3569a54b062e07fa7d42066cfb2d94ef38ad2c10 Mon Sep 17 00:00:00 2001 From: SintezCode Date: Mon, 26 Jun 2017 17:37:20 +0300 Subject: [PATCH 2/5] Update xpdoquery.class.php --- core/xpdo/om/xpdoquery.class.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/xpdo/om/xpdoquery.class.php b/core/xpdo/om/xpdoquery.class.php index 17f3e7a5e08..52f9da9314d 100644 --- a/core/xpdo/om/xpdoquery.class.php +++ b/core/xpdo/om/xpdoquery.class.php @@ -57,6 +57,9 @@ abstract class xPDOQuery extends xPDOCriteria { '>=', '<=>', ' LIKE ', + ' RLIKE ', + ' REGEXP ', + ' REGEXP BINARY ', ' IS NULL', ' IS NOT NULL', ' BETWEEN ', From dbb5b0a0f07d829ea8d0bc464f4161554cffed1e Mon Sep 17 00:00:00 2001 From: SintezCode Date: Mon, 26 Jun 2017 21:40:34 +0300 Subject: [PATCH 3/5] Update xpdoquery.class.php --- core/xpdo/om/xpdoquery.class.php | 3 --- 1 file changed, 3 deletions(-) diff --git a/core/xpdo/om/xpdoquery.class.php b/core/xpdo/om/xpdoquery.class.php index 52f9da9314d..17f3e7a5e08 100644 --- a/core/xpdo/om/xpdoquery.class.php +++ b/core/xpdo/om/xpdoquery.class.php @@ -57,9 +57,6 @@ abstract class xPDOQuery extends xPDOCriteria { '>=', '<=>', ' LIKE ', - ' RLIKE ', - ' REGEXP ', - ' REGEXP BINARY ', ' IS NULL', ' IS NOT NULL', ' BETWEEN ', From 396f798cf40f882a2ff1ff85e6d71878cd9afc6e Mon Sep 17 00:00:00 2001 From: SintezCode Date: Mon, 26 Jun 2017 22:35:18 +0300 Subject: [PATCH 4/5] Update unpack.class.php --- core/model/modx/processors/browser/file/unpack.class.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/core/model/modx/processors/browser/file/unpack.class.php b/core/model/modx/processors/browser/file/unpack.class.php index 544e590594e..661af4bd1d3 100644 --- a/core/model/modx/processors/browser/file/unpack.class.php +++ b/core/model/modx/processors/browser/file/unpack.class.php @@ -29,8 +29,7 @@ public function process() { $this->modx->getService('fileHandler', 'modFileHandler'); - $target = $this->properties['path'].$this->properties['file']; - if(strpos($target,'/')!==0)$target=$this->modx->getOption('base_path').$target;//if path relative add base_path + $target = $this->modx->getOption('base_path') . $this->properties['path'] . $this->properties['file']; $target = preg_replace('/[\.]{2,}/', '', htmlspecialchars($target)); $fileobj = $this->modx->fileHandler->make($target); From 2bc0f65750e344af982bb653ec77fb2ba57e42ba Mon Sep 17 00:00:00 2001 From: SintezCode Date: Mon, 26 Jun 2017 22:39:19 +0300 Subject: [PATCH 5/5] Add RLIKE, REGEXP operators Add RLIKE, REGEXP operators to use in conditions --- core/xpdo/om/xpdoquery.class.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/xpdo/om/xpdoquery.class.php b/core/xpdo/om/xpdoquery.class.php index 17f3e7a5e08..52f9da9314d 100644 --- a/core/xpdo/om/xpdoquery.class.php +++ b/core/xpdo/om/xpdoquery.class.php @@ -57,6 +57,9 @@ abstract class xPDOQuery extends xPDOCriteria { '>=', '<=>', ' LIKE ', + ' RLIKE ', + ' REGEXP ', + ' REGEXP BINARY ', ' IS NULL', ' IS NOT NULL', ' BETWEEN ',