@@ -37,6 +37,13 @@ defmodule ErrorTracker.Integrations.PlugTest do
3737 conn
3838 |> Plug.Conn . put_req_header ( "cookie" , "who stole the cookie from the cookie jar ?" )
3939 |> Plug.Conn . put_req_header ( "authorization" , "Bearer plz-dont-leak-my-secrets" )
40+ |> Plug.Conn . put_req_header ( "authentication-helper" , "hunter42" )
41+ |> Plug.Conn . put_req_header ( "important-token" , "abcxyz" )
42+ |> Plug.Conn . put_req_header ( "private-name" , "Some call me... Tim" )
43+ |> Plug.Conn . put_req_header ( "special-credential" , "drink-your-ovaltine" )
44+ |> Plug.Conn . put_req_header ( "special-key" , "Begin Private Key; dontleakmeplz" )
45+ |> Plug.Conn . put_req_header ( "special-secret" , "Shh, it's a secret" )
46+ |> Plug.Conn . put_req_header ( "special-password" , "correct-horse-battery-staple" )
4047 |> Plug.Conn . put_req_header ( "safe" , "this can be safely stored in cleartext" )
4148
4249 IntegrationPlug . report_error (
@@ -51,7 +58,15 @@ defmodule ErrorTracker.Integrations.PlugTest do
5158
5259 assert "cookie" not in header_names
5360 assert "authorization" not in header_names
61+ assert "authentication-helper" not in header_names
62+ assert "important-token" not in header_names
63+ assert "private-name" not in header_names
64+ assert "special-credential" not in header_names
65+ assert "special-key" not in header_names
66+ assert "special-password" not in header_names
67+ assert "special-secret" not in header_names
5468
5569 assert "safe" in header_names
70+ assert length ( header_names ) == 1
5671 end
5772end
0 commit comments