Commit 234dbad5 authored by nanahira's avatar nanahira

fix

parent 9b80bee7
......@@ -129,7 +129,7 @@ var getDecks = function(callback) {
}
var delDeck = function (deck_name, callback) {
if (deck_name.startsWith("../") || deck_name.contains("/../")) { //security issue
if (deck_name.startsWith("../") || deck_name.match(/\/\.\.\//)) { //security issue
callback("Invalid deck");
}
fs.unlink(config.deck_path + deck_name, callback);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment