From 047c60d1987c216163a4d403aae03acae7c1e740 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Thu, 2 Sep 2010 11:04:17 -0400 Subject: [PATCH] Sanitze error messages so the jail path is not revealed. --- src/server.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/server.go b/src/server.go index a822212..1533f08 100644 --- a/src/server.go +++ b/src/server.go @@ -16,6 +16,7 @@ import ( "json" "os" "path" + "strings" "./paths" ) @@ -51,6 +52,7 @@ func serviceHandler(connection *http.Conn, request *http.Request) { } func errorResponse(connection *http.Conn, message string) { + message = strings.Replace(message, paths.JailRoot, "/", -1) response := map[string] string { "error": "-1", "message": message, -- 2.43.5