For seriously don't silently eat my urls kthxbye
pull/313/head
Lennart Kats 2016-06-02 10:50:21 +00:00
rodzic edbd8fc19d
commit b3a10c72c2
2 zmienionych plików z 4 dodań i 1 usunięć

Wyświetl plik

@ -16,8 +16,10 @@ module.exports = function(options, imports, register) {
imports.connect.addResponseMethod("secureRedirect", function(location) { imports.connect.addResponseMethod("secureRedirect", function(location) {
var parsedLocation = url.parse(location, false, true); var parsedLocation = url.parse(location, false, true);
if (!trustedDomainsRe.test(parsedLocation.host)) if (!trustedDomainsRe.test(parsedLocation.host)) {
console.log("Avoiding untrusted redirect to", parsedLocation.host)
location = parsedLocation.path || "/"; location = parsedLocation.path || "/";
}
this.redirect(location); this.redirect(location);
}); });

Wyświetl plik

@ -59,6 +59,7 @@
], ],
"c9plugins": { "c9plugins": {
"c9.ide.language": "#79bcb2fe06", "c9.ide.language": "#79bcb2fe06",
"c9.ide.language.core": "#undefined",
"c9.ide.language.css": "#be07d72209", "c9.ide.language.css": "#be07d72209",
"c9.ide.language.generic": "#3949510863", "c9.ide.language.generic": "#3949510863",
"c9.ide.language.html": "#22fdc74869", "c9.ide.language.html": "#22fdc74869",