I understand that Plug.Static validates the path received to avoid directory traversals outside the specified directory. However I think it would be enough to discard the request and let other plugs to evaluate if they want to handle it.
For example, I have a Phoenix app where a controller receives one of the parameters that includes a slash (yes, my entity id contains slashes...). These slashes are properly escaped into the URL but the Plug.Static prevents these routes to reach the Phoenix router because it raises the InvalidPathError exception.
If there is not a better reason to continue raising this error, I could send a PR with the fix.
I understand that
Plug.Staticvalidates the path received to avoid directory traversals outside the specified directory. However I think it would be enough to discard the request and let other plugs to evaluate if they want to handle it.For example, I have a Phoenix app where a controller receives one of the parameters that includes a slash (yes, my entity id contains slashes...). These slashes are properly escaped into the URL but the
Plug.Staticprevents these routes to reach the Phoenix router because it raises theInvalidPathErrorexception.If there is not a better reason to continue raising this error, I could send a PR with the fix.