Added tobi's fix from Minnegard.

This commit is contained in:
Philipp Naderer 2009-05-15 20:44:55 +00:00
parent 23425bc608
commit 9111aefcdd

View file

@ -59,7 +59,7 @@ HopObject.prototype.map = function(values) {
HopObject.prototype.onRequest = function() { HopObject.prototype.onRequest = function() {
// Checking if we are on the correct host to prevent at least some XSS issues // Checking if we are on the correct host to prevent at least some XSS issues
if (false && req.action !== "notfound" && req.action !== "error" && if (req.action !== "notfound" && req.action !== "error" &&
!this.href().toLowerCase().startsWith(req.servletRequest.scheme + !this.href().toLowerCase().startsWith(req.servletRequest.scheme +
"://" + req.servletRequest.serverName.toLowerCase())) { "://" + req.servletRequest.serverName.toLowerCase())) {
res.redirect(this.href(req.action === "main" ? String.EMPTY : req.action)); res.redirect(this.href(req.action === "main" ? String.EMPTY : req.action));