Don't validate on missing public key.
This commit is contained in:
parent
a9f78fe8e0
commit
368e085144
|
@ -47,6 +47,7 @@ def validate_conn(conn) do
|
||||||
else
|
else
|
||||||
e ->
|
e ->
|
||||||
Logger.debug("Could not public key!")
|
Logger.debug("Could not public key!")
|
||||||
|
false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -401,6 +401,13 @@ def get("https://niu.moe/users/rye", ["Accept": "application/activity+json"], _)
|
||||||
}}
|
}}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def get("https://mst3k.interlinked.me/users/luciferMysticus", ["Accept": "application/activity+json"], _) do
|
||||||
|
{:ok, %Response{
|
||||||
|
status_code: 200,
|
||||||
|
body: File.read!("test/fixtures/httpoison_mock/lucifermysticus.json")
|
||||||
|
}}
|
||||||
|
end
|
||||||
|
|
||||||
def get("https://mstdn.io/users/mayuutann", ["Accept": "application/activity+json"], _) do
|
def get("https://mstdn.io/users/mayuutann", ["Accept": "application/activity+json"], _) do
|
||||||
{:ok, %Response{
|
{:ok, %Response{
|
||||||
status_code: 200,
|
status_code: 200,
|
||||||
|
|
|
@ -183,6 +183,7 @@ test "this too" do
|
||||||
{"(request-target)", "post /inbox"}
|
{"(request-target)", "post /inbox"}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
assert HTTPSignatures.validate_conn(conn)
|
assert HTTPSignatures.validate_conn(conn)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue