Directory traversal fix. I don't think it could've led to something
serious, but lets fix it anyway.
This commit is contained in:
parent
750f7fa50a
commit
20c8e3a2cb
1 changed files with 1 additions and 0 deletions
|
|
@ -90,6 +90,7 @@
|
|||
var type = hash.slice(0, slash);
|
||||
var slug = hash.slice(slash + 1);
|
||||
if (!slug || (type !== "blog" && type !== "projects")) return;
|
||||
if (!/^[a-z0-9_-]+$/i.test(slug)) return;
|
||||
var fragUrl = "/fragments/" + type + "/" + slug + "/";
|
||||
WM.showAt("win-" + type, fragUrl, "/fragments/" + type + "/", function (c) {
|
||||
injectShare(c, fragUrl);
|
||||
|
|
|
|||
Loading…
Reference in a new issue