kopia lustrzana https://github.com/c9/core
commit
4dc67d2c40
|
@ -14,10 +14,10 @@ module.exports = function(options, imports, register) {
|
|||
this.end("");
|
||||
});
|
||||
imports.connect.addResponseMethod("secureRedirect", function(location) {
|
||||
var parsedLocation = url.parse(location);
|
||||
|
||||
var parsedLocation = url.parse(location, false, true);
|
||||
|
||||
if (!trustedDomainsRe.test(parsedLocation.host))
|
||||
location = parsedLocation.path;
|
||||
location = parsedLocation.path || "/";
|
||||
|
||||
this.redirect(location);
|
||||
});
|
||||
|
|
Ładowanie…
Reference in New Issue