Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
typo3
qfq
Commits
6a4dd684
Commit
6a4dd684
authored
Dec 10, 2018
by
Marc Egger
Browse files
Fixes #7223 Add "-" as allowed characters in filenames
parent
e1f7510e
Pipeline
#1118
passed with stage
in 1 minute and 37 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
extension/qfq/qfq/helper/Sanitize.php
View file @
6a4dd684
...
...
@@ -171,7 +171,7 @@ class Sanitize {
public
static
function
safeFilename
(
$filename
,
$flagBaseName
=
false
,
$allowSlash
=
false
)
{
// Disallow 'none alphanumeric'. Allow dot or underscore and conditionally '/'.
$pattern
=
(
$allowSlash
)
?
'([^[:alnum:]._/])'
:
'([^[:alnum:]._])'
;
$pattern
=
(
$allowSlash
)
?
'([^[:alnum:]._
\-
/])'
:
'([^[:alnum:]._
\-
])'
;
$search
=
array
(
// Definition of German Umlauts START
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment