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
59d4cc60
Commit
59d4cc60
authored
Apr 28, 2017
by
lain
Browse files
normalize hex number.
parent
1422e7aa
Changes
1
Hide whitespace changes
Inline
Side-by-side
lib/pleroma/web/websub/websub_controller.ex
View file @
59d4cc60
...
...
@@ -34,6 +34,7 @@ def websub_subscription_confirmation(conn, %{"id" => id, "hub.mode" => "subscrib
def
websub_incoming
(
conn
,
%{
"id"
=>
id
})
do
with
"sha1="
<>
signature
<-
hd
(
get_req_header
(
conn
,
"x-hub-signature"
)),
signature
<-
String
.
upcase
(
signature
),
%
WebsubClientSubscription
{}
=
websub
<-
Repo
.
get
(
WebsubClientSubscription
,
id
),
{
:ok
,
body
,
_conn
}
=
read_body
(
conn
),
^
signature
<-
Websub
.
sign
(
websub
.
secret
,
body
)
do
...
...
Write
Preview
Supports
Markdown
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