Commit dc98cb9e authored by Ryan Herbert's avatar Ryan Herbert Committed by marc duez
Browse files

url.js param failsafe

if a parameter is passed that doesn't respect the format, ignore it
parent 37c44301
......@@ -115,6 +115,13 @@ Url.prototype= {
}
for (var i = 0; i < url_param.length; i++) {
var tmparr = url_param[i].split("=");
// if the format isn't respected ignore parameter
if (tmparr.length !== 2) {
console.log("incorrect parameter: " + url_param[i]);
continue;
}
var p = params[tmparr[0]];
var key = this.encoder.decode(tmparr[0]);
var val = tmparr[1];
......
Supports Markdown
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