[Pkg-owncloud-commits] [owncloud] 365/394: escape regular expressions
David Prévot
taffit at alioth.debian.org
Fri Nov 8 23:12:51 UTC 2013
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to annotated tag v4.5.10
in repository owncloud.
commit 574ff253bd04ba675f3814738deddcd5625fe74e
Author: Björn Schießle <schiessle at owncloud.com>
Date: Wed Feb 27 10:57:05 2013 +0100
escape regular expressions
---
apps/files_versions/lib/versions.php | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/apps/files_versions/lib/versions.php b/apps/files_versions/lib/versions.php
index 3c1fc64..c438e36 100644
--- a/apps/files_versions/lib/versions.php
+++ b/apps/files_versions/lib/versions.php
@@ -94,7 +94,7 @@ class Storage {
// check mininterval if the file is being modified by the owner (all shared files should be versioned despite mininterval)
if ($uid == \OCP\User::getUser()) {
$versionsName=\OCP\Config::getSystemValue('datadirectory').$versions_fileview->getAbsolutePath($filename);
- $matches=glob($versionsName.'.v*');
+ $matches=glob(preg_quote($versionsName).'.v*');
if ( $matches ) {
sort($matches);
$parts=explode('.v',end($matches));
@@ -155,7 +155,7 @@ class Storage {
$versionsName=\OCP\Config::getSystemValue('datadirectory').$versions_fileview->getAbsolutePath($filename);
// check for old versions
- $matches=glob($versionsName.'.v*');
+ $matches=glob(preg_quote($versionsName).'.v*');
if(count($matches)>0) {
return true;
}else{
@@ -182,7 +182,7 @@ class Storage {
$versionsName = \OCP\Config::getSystemValue('datadirectory').$versions_fileview->getAbsolutePath($filename);
$versions = array();
// fetch for old versions
- $matches = glob( $versionsName.'.v*' );
+ $matches = glob( preg_quote($versionsName).'.v*' );
sort( $matches );
@@ -248,7 +248,7 @@ class Storage {
$versionsName=\OCP\Config::getSystemValue('datadirectory').$versions_fileview->getAbsolutePath($filename);
// check for old versions
- $matches = glob( $versionsName.'.v*' );
+ $matches = glob( preg_quote($versionsName).'.v*' );
if( count( $matches ) > \OCP\Config::getSystemValue( 'files_versionmaxversions', Storage::DEFAULTMAXVERSIONS ) ) {
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git
More information about the Pkg-owncloud-commits
mailing list