Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
optimus
api
Commits
af7eac4d
Commit
af7eac4d
authored
Dec 01, 2020
by
Lionel VEST
Browse files
*
parent
9c04d1e5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
resources/files.php
resources/files.php
+1
-1
No files found.
resources/files.php
View file @
af7eac4d
...
...
@@ -17,7 +17,7 @@ function read($connection,$input)
if
(
!
isset
(
$input
->
body
->
path
)
return
array
(
"code"
=>
400
,
"message"
=>
"Aucun chemin n'a été spécifié"
);
if
(
!
isset
(
$input
->
body
->
items
)
return
array
(
"code"
=>
400
,
"message"
=>
"Aucun fichier ou dossier à compresser n'a été spécifié"
);
if
(
strpos
(
$input
->
body
->
path
,
'/..'
))
return
array
(
"code"
=>
400
,
"message"
=>
"Le chemin fourni est invalide"
);
foreach
(
$item
as
$input
->
body
->
items
)
foreach
(
$input
->
body
->
items
as
$item
)
if
(
strpos
(
$input
->
body
->
path
,
'/'
))
return
array
(
"code"
=>
400
,
"message"
=>
"Le fichier spécifié est invalide"
);
$path
=
'/srv/files/'
.
$input
->
db
.
str_replace
(
'/files/'
.
$input
->
db
,
''
,
$input
->
body
->
path
);
...
...
Write
Preview
Markdown
is supported
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