From eb3194b0a0714b5c7912905eb4991c3756b44d84 Mon Sep 17 00:00:00 2001 From: WeebDataHoarder <57538841+WeebDataHoarder@users.noreply.github.com> Date: Tue, 7 Jun 2022 00:44:13 +0200 Subject: [PATCH] Fix Host rebind check --- FinalCommander.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FinalCommander.go b/FinalCommander.go index b504f51..2d058c9 100644 --- a/FinalCommander.go +++ b/FinalCommander.go @@ -237,7 +237,7 @@ func handleHexHash(pathElements []string, ctx httputils.RequestContext, host str } func handle(ctx httputils.RequestContext) { - if len(ctx.GetRequestHeader("Host")) > 0 && ctx.GetRequestHeader("Host") == ctx.GetTLSServerName() { //Prevents rebinding / DNS stuff + if len(ctx.GetRequestHeader("Host")) > 0 && ctx.GetRequestHeader("Host") != ctx.GetTLSServerName() { //Prevents rebinding / DNS stuff ctx.SetResponseCode(http.StatusNotFound) return }