From dd8711ed9b7ab47526f9bbad848b7ede9c911188 Mon Sep 17 00:00:00 2001 From: preciz Date: Thu, 13 Aug 2026 21:45:49 +0200 Subject: [PATCH] Optimize static path validation --- lib/plug/static.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/plug/static.ex b/lib/plug/static.ex index 1fe81599..7632d9ef 100644 --- a/lib/plug/static.ex +++ b/lib/plug/static.ex @@ -478,7 +478,7 @@ defmodule Plug.Static do end defp invalid_path?([h | _], _match) when h in [".", "..", ""], do: true - defp invalid_path?([h | t], match), do: String.contains?(h, match) or invalid_path?(t) + defp invalid_path?([h | t], match), do: String.contains?(h, match) or invalid_path?(t, match) defp invalid_path?([], _match), do: false defp merge_headers(conn, {module, function, args}) do