diff --git a/.x-run b/.x-run index 92a47c7..a769fd1 100644 --- a/.x-run +++ b/.x-run @@ -53,6 +53,14 @@ exit -- 1 !! +<< go / build / server / release / analyze / escapes + "${X_RUN[@]}" ':: go / build / server / release / analyze' "${@}" \ + 2>&1 \ + | grep -F -e ' escapes ' \ + | LC_ALL=C sort -n -k 2,2 -t ':' + exit -- 0 +!! + << go / build / server / release / publish test "${#}" -eq 0 diff --git a/sources/cmd/server.go b/sources/cmd/server.go index a529c4a..f00df8d 100644 --- a/sources/cmd/server.go +++ b/sources/cmd/server.go @@ -94,7 +94,7 @@ func (_server *server) Serve (_context *fasthttp.RequestCtx) () { return } else if bytes.HasPrefix (_path, []byte ("/__/errors/banners/")) { _code := _path[len ("/__/errors/banners/") :] - if _code, _error := strconv.Atoi (BytesToString (_code)); _error == nil { + if _code, _error := strconv.Atoi (BytesToString (*NoEscapeBytes (&_code))); _error == nil { _banner, _bannerFound := ErrorBannersData[uint (_code)] if (_code > 0) && _bannerFound { _server.ServeStatic (_context, http.StatusOK, _banner, ErrorBannerContentType, ErrorBannerContentEncoding, true)