diff options
author | zotlabs <mike@macgirvin.com> | 2017-04-20 20:19:15 -0700 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2017-04-20 20:19:15 -0700 |
commit | 94f15e355166f0abd3698414948abff2397a7ad0 (patch) | |
tree | 48202430a91a6498aca71a0f4bf3ae90076169ba /Zotlabs/Module/Editpost.php | |
parent | 2d90b831f0af1c276cc590a5fcec427de3eb32f8 (diff) | |
download | volse-hubzilla-94f15e355166f0abd3698414948abff2397a7ad0.tar.gz volse-hubzilla-94f15e355166f0abd3698414948abff2397a7ad0.tar.bz2 volse-hubzilla-94f15e355166f0abd3698414948abff2397a7ad0.zip |
The rest of the library and backend changes to support client-side e2ee and deprecate previous uses of item_obscured.
Diffstat (limited to 'Zotlabs/Module/Editpost.php')
-rw-r--r-- | Zotlabs/Module/Editpost.php | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/Zotlabs/Module/Editpost.php b/Zotlabs/Module/Editpost.php index d7612b165..629bdd3fd 100644 --- a/Zotlabs/Module/Editpost.php +++ b/Zotlabs/Module/Editpost.php @@ -31,7 +31,10 @@ class Editpost extends \Zotlabs\Web\Controller { dbesc(get_observer_hash()) ); - if(! count($itm)) { + // don't allow web editing of potentially binary content (item_obscured = 1) + // @FIXME how do we do it instead? + + if((! $itm) || intval($itm[0]['item_obscured'])) { notice( t('Item is not editable') . EOL); return; } @@ -44,14 +47,6 @@ class Editpost extends \Zotlabs\Web\Controller { $channel = \App::get_channel(); - if(intval($itm[0]['item_obscured'])) { - $key = get_config('system','prvkey'); - if($itm[0]['title']) - $itm[0]['title'] = crypto_unencapsulate(json_decode($itm[0]['title'],true),$key); - if($itm[0]['body']) - $itm[0]['body'] = crypto_unencapsulate(json_decode($itm[0]['body'],true),$key); - } - $category = ''; $catsenabled = ((feature_enabled($owner_uid,'categories')) ? 'categories' : ''); |