Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
our_own_cloud_project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
die_coolen_jungs
our_own_cloud_project
Commits
0089437c
Commit
0089437c
authored
11 years ago
by
Björn Schießle
Browse files
Options
Downloads
Plain Diff
Merge pull request #3727 from owncloud/fix_glob_escaping
only escape glob pattern
parents
6156d718
99c62dfd
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
3rdparty
+1
-1
1 addition, 1 deletion
3rdparty
apps/files_trashbin/lib/trash.php
+312
-319
312 additions, 319 deletions
apps/files_trashbin/lib/trash.php
apps/files_versions/lib/versions.php
+4
-3
4 additions, 3 deletions
apps/files_versions/lib/versions.php
with
317 additions
and
323 deletions
3rdparty
@
e312294e
Compare
3ef9f738
...
e312294e
Subproject commit
3ef9f738a9107879dddc7d97842cf4d2198fae4c
Subproject commit
e312294ef62873df2b8c02e774f9dfe1b7fbc38d
This diff is collapsed.
Click to expand it.
apps/files_trashbin/lib/trash.php
+
312
−
319
View file @
0089437c
This diff is collapsed.
Click to expand it.
apps/files_versions/lib/versions.php
+
4
−
3
View file @
0089437c
...
...
@@ -241,11 +241,12 @@ class Storage {
public
static
function
getVersions
(
$uid
,
$filename
,
$count
=
0
)
{
if
(
\OCP\Config
::
getSystemValue
(
'files_versions'
,
Storage
::
DEFAULTENABLED
)
==
'true'
)
{
$versions_fileview
=
new
\OC\Files\View
(
'/'
.
$uid
.
'/files_versions'
);
$versionsName
=
$versions_fileview
->
getLocalFile
(
$filename
);
$versionsName
=
$versions_fileview
->
getLocalFile
(
$filename
)
.
'.v'
;
$escapedVersionName
=
preg_replace
(
'/(\*|\?|\[)/'
,
'[$1]'
,
$versionsName
);
$versions
=
array
();
// fetch for old versions
$matches
=
glob
(
preg_quote
(
$v
ersion
s
Name
)
.
'
.v
*'
);
$matches
=
glob
(
$escapedV
ersionName
.
'*'
);
if
(
!
$matches
)
{
return
$versions
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment