mirror of
https://github.com/friendica/friendica
synced 2025-04-24 12:30:10 +00:00
make sure to use local avatar if we have one
This commit is contained in:
parent
6a3815e751
commit
72fd6eec4b
2 changed files with 32 additions and 3 deletions
|
@ -19,10 +19,35 @@ function salmon_key($pubkey) {
|
|||
|
||||
|
||||
function base64url_encode($s) {
|
||||
return strtr(base64_encode($s),'+/','-_');
|
||||
$s = strtr(base64_encode($s),'+/','-_');
|
||||
/*
|
||||
* // placeholder for un-padded base64url_encode
|
||||
* // per latest salmon rev
|
||||
*
|
||||
* $s = str_replace('=','',$s);
|
||||
*
|
||||
*/
|
||||
return $s;
|
||||
}
|
||||
|
||||
function base64url_decode($s) {
|
||||
|
||||
/*
|
||||
* // Placeholder for new rev of salmon which strips base64 padding.
|
||||
* // PHP base64_decode handles the un-padded input without requiring this step
|
||||
* // Uncomment if you find you need it.
|
||||
*
|
||||
* $l = strlen($s);
|
||||
* if(! strpos($s,'=')) {
|
||||
* $m = $l % 4;
|
||||
* if($m == 2)
|
||||
* $s .= '==';
|
||||
* if($m == 3)
|
||||
* $s .= '=';
|
||||
* }
|
||||
*
|
||||
*/
|
||||
|
||||
return base64_decode(strtr($s,'-_','+/'));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue