Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Pleroma
pleroma
Commits
27576828
Commit
27576828
authored
Feb 22, 2018
by
lain
Browse files
More logging.
parent
5dc68d30
Pipeline
#800
failed with stage
in 3 minutes and 8 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
lib/pleroma/plugs/http_signature.ex
View file @
27576828
defmodule
Pleroma
.
Web
.
Plugs
.
HTTPSignaturePlug
do
alias
Pleroma
.
Web
.
HTTPSignatures
import
Plug
.
Conn
require
Logger
def
init
(
options
)
do
options
...
...
@@ -11,6 +12,8 @@ def call(%{assigns: %{valid_signature: true}} = conn, opts) do
end
def
call
(
conn
,
opts
)
do
user
=
conn
.
params
[
"actor"
]
Logger
.
debug
(
"Checking sig for
#{
user
}
"
)
if
get_req_header
(
conn
,
"signature"
)
do
conn
=
conn
|>
put_req_header
(
"(request-target)"
,
String
.
downcase
(
"
#{
conn
.
method
}
#{
conn
.
request_path
}
"
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment