Skip to content
This repository was archived by the owner on Feb 6, 2020. It is now read-only.

Commit 2b4fd9d

Browse files
committed
fix the relative path not start with .. or .
1 parent 20949fc commit 2b4fd9d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

autoload/server/static/scripts/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
var paths = path.split('/');
1313
if(/^https?:?/i.test(paths[0])) {
1414
return path;
15-
} else if(!/(^\..*)|(^\.\..*)/i.test(paths[0])) {
15+
} else if(/^$/.test(paths[0])) {
1616
return '/image?' + Base64.encode(path);
1717
} else {
1818
for(var i = 0, len = paths.length; i < len; i++) {

0 commit comments

Comments
 (0)