Commit ff1e9f4d authored by Eben Blaisdell's avatar Eben Blaisdell

safe strats

parent 2855043f
......@@ -76,7 +76,7 @@ app.post('/signup', function (req, res) {
});
app.post('/push', function (req, res) {
if(!checkFileSafe(req.body.strat)){
if(checkFileUnsafe(req.body.strat)){
res.send("Invalid Strat.");
return;
}
......@@ -95,7 +95,7 @@ app.post('/push', function (req, res) {
});
app.post('/pull', function (req, res) {
if(!checkFileSafe(req.body.strat)){
if(checkFileUnsafe(req.body.strat)){
res.send("Invalid Strat.");
return;
}
......@@ -289,7 +289,7 @@ function ipAddresses(){
return addresses;
}
function checkFileSafe(filename){
function checkFileUnsafe(filename){
filename == "" || filename.indexOf(".") != -1 || filename.indexOf("~") != -1 || filename.indexOf("/") != -1;
}
......
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