kopia lustrzana https://github.com/c9/core
Merge pull request +14121 from c9/ide-profile-fix-logout
Ide profile fix logoutpull/313/head
commit
972a690cd6
|
@ -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);
|
||||||
});
|
});
|
||||||
|
|
Ładowanie…
Reference in New Issue