Ignore padding for salmon public keys.

This commit is contained in:
Roger Braun 2017-08-25 15:09:05 +02:00
commit fecbd099cd
3 changed files with 14 additions and 1 deletions

View file

@ -60,7 +60,7 @@ defmodule Pleroma.Web.Salmon do
[modulus, exponent] = magickey
|> String.split(".")
|> Enum.map(&Base.url_decode64!/1)
|> Enum.map(fn (n) -> Base.url_decode64!(n, padding: false) end)
|> Enum.map(make_integer)
{:RSAPublicKey, modulus, exponent}