issue with post signatures if posted from api and logged in locally with a different identity.
This commit is contained in:
parent
1e53528363
commit
35ed9b9b72
@ -1527,7 +1527,7 @@ function item_store($arr, $allow_exec = false, $deliver = true) {
|
||||
// apply the input filter here - if it is obscured it has been filtered already
|
||||
$arr['body'] = trim(z_input_filter($arr['uid'],$arr['body'],$arr['mimetype']));
|
||||
|
||||
if(local_channel() && (! $arr['sig'])) {
|
||||
if(local_channel() && (local_channel() == $arr['uid']) && (! $arr['sig'])) {
|
||||
$channel = App::get_channel();
|
||||
if($channel['channel_hash'] === $arr['author_xchan']) {
|
||||
$arr['sig'] = base64url_encode(rsa_sign($arr['body'],$channel['channel_prvkey']));
|
||||
@ -1944,7 +1944,7 @@ function item_store_update($arr,$allow_exec = false, $deliver = true) {
|
||||
// apply the input filter here - if it is obscured it has been filtered already
|
||||
$arr['body'] = trim(z_input_filter($arr['uid'],$arr['body'],$arr['mimetype']));
|
||||
|
||||
if(local_channel() && (! $arr['sig'])) {
|
||||
if(local_channel() && (local_channel() == $arr['uid']) && (! $arr['sig'])) {
|
||||
$channel = App::get_channel();
|
||||
if($channel['channel_hash'] === $arr['author_xchan']) {
|
||||
$arr['sig'] = base64url_encode(rsa_sign($arr['body'],$channel['channel_prvkey']));
|
||||
|
8217
util/hmessages.po
8217
util/hmessages.po
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user