Skip to content

Commit 4ca6ca2

Browse files
committed
Explicitly check for %09 in route, closes #5415
1 parent 8953b6f commit 4ca6ca2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/phoenix/controller.ex

+3-3
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,7 @@ defmodule Phoenix.Controller do
504504
end
505505
end
506506

507-
@invalid_local_url_chars ["\\", "/%", "/\t"]
507+
@invalid_local_url_chars ["\\", "/%09", "/\t"]
508508
defp validate_local_url("//" <> _ = to), do: raise_invalid_url(to)
509509

510510
defp validate_local_url("/" <> _ = to) do
@@ -1033,7 +1033,7 @@ defmodule Phoenix.Controller do
10331033
defp assigns_layout(conn, _assigns, format) do
10341034
case conn.private[:phoenix_layout] do
10351035
%{^format => bad_value, _: good_value} when good_value != false ->
1036-
IO.warn """
1036+
IO.warn("""
10371037
conflicting layouts found. A layout has been set with format, such as:
10381038
10391039
put_layout(conn, #{format}: #{inspect(bad_value)})
@@ -1049,7 +1049,7 @@ defmodule Phoenix.Controller do
10491049
to use layouts with formats:
10501050
10511051
use Phoenix.Controller, layouts: [#{format}: #{inspect(bad_value)}]
1052-
"""
1052+
""")
10531053

10541054
if format in layout_formats(conn), do: good_value, else: false
10551055

0 commit comments

Comments
 (0)