diff options
author | Thomas Willingham <founder@kakste.com> | 2013-10-01 22:58:44 +0100 |
---|---|---|
committer | Thomas Willingham <founder@kakste.com> | 2013-10-01 22:58:44 +0100 |
commit | 70fd797994e4b861d20d99cec2a7d801e478d894 (patch) | |
tree | 5b00b61522f2c7136912396df54bd3251e3f17c8 /mod/post.php | |
parent | 2c9c206808fec2212141f8630ce534ed29a47037 (diff) | |
parent | 27e97571d44f9e69a66eead9da2de4209996457d (diff) | |
download | volse-hubzilla-70fd797994e4b861d20d99cec2a7d801e478d894.tar.gz volse-hubzilla-70fd797994e4b861d20d99cec2a7d801e478d894.tar.bz2 volse-hubzilla-70fd797994e4b861d20d99cec2a7d801e478d894.zip |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'mod/post.php')
-rw-r--r-- | mod/post.php | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/mod/post.php b/mod/post.php index 378192cbf..92d810356 100644 --- a/mod/post.php +++ b/mod/post.php @@ -174,18 +174,30 @@ function post_post(&$a) { if(array_key_exists('iv',$data)) { $data = aes_unencapsulate($data,get_config('system','prvkey')); logger('mod_zot: decrypt1: ' . $data, LOGGER_DATA); - if(! $data) { - $ret['message'] = 'Decryption failed.'; - json_return_and_die($ret); - } + +// susceptible to Bleichenbacher's attack +// if(! $data) { +// $ret['message'] = 'Decryption failed.'; +// json_return_and_die($ret); +// } $data = json_decode($data,true); } if(! $data) { - $ret['message'] = 'No data received.'; - json_return_and_die($ret); + + // possible Bleichenbacher's attack, just treat it as a + // message we have no handler for. It should fail a bit + // further along with "no hub". Our public key is public + // knowledge. There's no reason why anybody should get the + // encryption wrong unless they're fishing or hacking. If + // they're developing and made a goof, this can be discovered + // in the logs of the destination site. If they're fishing or + // hacking, the bottom line is we can't verify their hub. + // That's all we're going to tell them. + + $data = array('type' => 'bogus'); } logger('mod_zot: decoded data: ' . print_r($data,true), LOGGER_DATA); |