Don't validate on missing public key.
authorlain <lain@soykaf.club>
Sun, 11 Mar 2018 13:47:37 +0000 (14:47 +0100)
committerlain <lain@soykaf.club>
Sun, 11 Mar 2018 13:47:37 +0000 (14:47 +0100)
lib/pleroma/web/http_signatures/http_signatures.ex
test/support/httpoison_mock.ex
test/web/http_sigs/http_sig_test.exs

index 09ac4a3748c539c37c3ab0dcdd303ef85988f3f5..d0695cb166828bfe6aec7b89f4829e93cebfab88 100644 (file)
@@ -47,6 +47,7 @@ defmodule Pleroma.Web.HTTPSignatures do
     else
       e ->
         Logger.debug("Could not public key!")
+        false
     end
   end
 
index ad9be9aef7957d561c4fd875d3888e3f105840a1..a8b1a60c04a805b03a1a20eb3c7aab944c8c350f 100644 (file)
@@ -401,6 +401,13 @@ defmodule HTTPoisonMock do
     }}
   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
     {:ok, %Response{
       status_code: 200,
index b54afa3fb95297212b90a3ef8a1ee3bd098558b3..b2bf8d61b3b5c64bb095722eb7243d53f54322b8 100644 (file)
@@ -183,6 +183,7 @@ defmodule Pleroma.Web.HTTPSignaturesTest do
         {"(request-target)", "post /inbox"}
       ]
     }
+
     assert HTTPSignatures.validate_conn(conn)
   end
 end