diff options
author | Fabio Comuni <fabrix.xm@gmail.com> | 2011-08-30 11:00:23 +0200 |
---|---|---|
committer | Fabio Comuni <fabrix.xm@gmail.com> | 2011-08-30 11:00:23 +0200 |
commit | d0926240a87327a7e38b822802ac192336f68791 (patch) | |
tree | 49c5d2eec9954efbe313e7130e1ce970a56c60e9 /include/salmon.php | |
parent | 97806544bcd7ee3831ffc515062afe0812828b76 (diff) | |
parent | 0f1bc6e9571e367b37246e43ce08921bf317fa7c (diff) | |
download | volse-hubzilla-d0926240a87327a7e38b822802ac192336f68791.tar.gz volse-hubzilla-d0926240a87327a7e38b822802ac192336f68791.tar.bz2 volse-hubzilla-d0926240a87327a7e38b822802ac192336f68791.zip |
Merge remote-tracking branch 'friendika/master' into newui
Diffstat (limited to 'include/salmon.php')
-rw-r--r-- | include/salmon.php | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/include/salmon.php b/include/salmon.php index 4043b4f1d..9153f8994 100644 --- a/include/salmon.php +++ b/include/salmon.php @@ -73,6 +73,13 @@ function slapper($owner,$url,$slap) { if(! strlen($url)) return; + + if(! $owner['sprvkey']) { + logger(sprintf("slapper: user '%s' (%d) does not have a salmon private key. Send failed.", + $owner['username'],$owner['uid'])); + return; + } + // add all namespaces to item $namespaces = <<< EOT @@ -102,11 +109,11 @@ EOT; $precomputed = '.YXBwbGljYXRpb24vYXRvbSt4bWw=.YmFzZTY0dXJs.UlNBLVNIQTI1Ng=='; - $signature = base64url_encode(rsa_sign(str_replace('=','',$data . $precomputed),true),$owner['sprvkey']); + $signature = base64url_encode(rsa_sign(str_replace('=','',$data . $precomputed),$owner['sprvkey'])); - $signature2 = base64url_encode(rsa_sign($data . $precomputed),$owner['sprvkey']); + $signature2 = base64url_encode(rsa_sign($data . $precomputed,$owner['sprvkey'])); - $signature3 = base64url_encode(rsa_sign($data),$owner['sprvkey']); + $signature3 = base64url_encode(rsa_sign($data,$owner['sprvkey'])); $salmon_tpl = get_markup_template('magicsig.tpl'); |