Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
PUBLIC
/
surfer-okd
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 94ff5399
authored
8 years ago
by
Johannes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
URI decode all paths
1 parent
5d361bf9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
src/files.js
src/files.js
View file @
94ff539
...
...
@@ -77,7 +77,7 @@ function removeBasePath(filePath) {
}
function
get
(
req
,
res
,
next
)
{
var
filePath
=
req
.
params
[
0
]
;
var
filePath
=
decodeURIComponent
(
req
.
params
[
0
])
;
var
absoluteFilePath
=
getAbsolutePath
(
filePath
);
if
(
!
absoluteFilePath
)
return
next
(
new
HttpError
(
403
,
'Path not allowed'
));
...
...
@@ -145,7 +145,7 @@ function put(req, res, next) {
}
function
del
(
req
,
res
,
next
)
{
var
filePath
=
req
.
params
[
0
]
;
var
filePath
=
decodeURIComponent
(
req
.
params
[
0
])
;
var
recursive
=
!!
req
.
query
.
recursive
;
var
dryRun
=
!!
req
.
query
.
dryRun
;
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
Attach a file
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 post a comment