aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorlain <lain@soykaf.club>2018-02-24 17:36:26 +0100
committerlain <lain@soykaf.club>2018-02-24 17:36:26 +0100
commitac67453e8afc57fc0d31806a0318d35a4d6f704e (patch)
tree2bc6fbd6ed64695fbaea86f211c15c2d751debad /lib
parente5fcc51a067dd420d37c68f9eabe0b7df2e048d5 (diff)
downloadpleroma-ac67453e8afc57fc0d31806a0318d35a4d6f704e.tar.gz
More logging for signature problems.
Diffstat (limited to 'lib')
-rw-r--r--lib/pleroma/plugs/http_signature.ex1
-rw-r--r--lib/pleroma/web/http_signatures/http_signatures.ex5
2 files changed, 5 insertions, 1 deletions
diff --git a/lib/pleroma/plugs/http_signature.ex b/lib/pleroma/plugs/http_signature.ex
index 7f40a20c0..9236c501c 100644
--- a/lib/pleroma/plugs/http_signature.ex
+++ b/lib/pleroma/plugs/http_signature.ex
@@ -20,6 +20,7 @@ defmodule Pleroma.Web.Plugs.HTTPSignaturePlug do
assign(conn, :valid_signature, HTTPSignatures.validate_conn(conn))
else
+ Logger.debug("No signature header!")
conn
end
end
diff --git a/lib/pleroma/web/http_signatures/http_signatures.ex b/lib/pleroma/web/http_signatures/http_signatures.ex
index cdc5e1f3f..93c7c310d 100644
--- a/lib/pleroma/web/http_signatures/http_signatures.ex
+++ b/lib/pleroma/web/http_signatures/http_signatures.ex
@@ -2,6 +2,7 @@
defmodule Pleroma.Web.HTTPSignatures do
alias Pleroma.User
alias Pleroma.Web.ActivityPub.ActivityPub
+ require Logger
def split_signature(sig) do
default = %{"headers" => "date"}
@@ -32,6 +33,7 @@ defmodule Pleroma.Web.HTTPSignatures do
if validate_conn(conn, public_key) do
true
else
+ Logger.debug("Could not validate, re-fetching user and trying one more time.")
# Fetch user anew and try one more time
with actor_id <- conn.params["actor"],
{:ok, _user} <- ActivityPub.make_user_from_ap_id(actor_id),
@@ -40,7 +42,8 @@ defmodule Pleroma.Web.HTTPSignatures do
end
end
else
- _ -> false
+ e ->
+ Logger.debug("Could not public key!")
end
end