Skip to content

Commit

Permalink
fix: decode proxy path(reruin#210)
Browse files Browse the repository at this point in the history
  • Loading branch information
reruin committed Jun 17, 2020
1 parent 8495a81 commit 6e74165
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/controllers/sharelist.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@ const { parsePath , pathNormalize , enablePreview, enableRange , isRelativePath
* @return [boolean]
*/
const isProxyPath = (path , paths) => {
const decodePath = decodeURIComponent(path)
return (
path == '' || path == '/' ||
decodePath == '' || decodePath == '/' ||
paths.length == 0 ||
paths.some(p => path.startsWith(p))
paths.some(p => decodePath.startsWith(decodeURIComponent(p)))
) ? true : false
}

Expand Down

0 comments on commit 6e74165

Please sign in to comment.