diff options
author | Manuel Jiménez Friaza <mjfriaza@openmailbox.org> | 2018-11-24 13:01:01 +0100 |
---|---|---|
committer | Manuel Jiménez Friaza <mjfriaza@openmailbox.org> | 2018-11-24 13:01:01 +0100 |
commit | f865d6e5dab19122fffc677da495b21d3d5e93e7 (patch) | |
tree | 8631750db2c385438207326479350ea909a625b4 /Zotlabs/Web | |
parent | 0bba9482dfbcc0fd8bea880ac3820548281ecfc2 (diff) | |
parent | bc9f2922e0e255e97cb607d099f60c8a81c4736f (diff) | |
download | volse-hubzilla-f865d6e5dab19122fffc677da495b21d3d5e93e7.tar.gz volse-hubzilla-f865d6e5dab19122fffc677da495b21d3d5e93e7.tar.bz2 volse-hubzilla-f865d6e5dab19122fffc677da495b21d3d5e93e7.zip |
Resolved merge conflicts
Diffstat (limited to 'Zotlabs/Web')
-rw-r--r-- | Zotlabs/Web/CheckJS.php | 50 | ||||
-rw-r--r-- | Zotlabs/Web/HTTPSig.php | 6 |
2 files changed, 5 insertions, 51 deletions
diff --git a/Zotlabs/Web/CheckJS.php b/Zotlabs/Web/CheckJS.php deleted file mode 100644 index e83ccf27b..000000000 --- a/Zotlabs/Web/CheckJS.php +++ /dev/null @@ -1,50 +0,0 @@ -<?php - -namespace Zotlabs\Web; - - -class CheckJS { - - private static $jsdisabled = 0; - - function __construct($test = 0) { - if(intval($_REQUEST['jsdisabled'])) - $this->jsdisabled = 1; - else - $this->jsdisabled = 0; - if(intval($_COOKIE['jsdisabled'])) - $this->jsdisabled = 1; - else - $this->jsdisabled = 0; - - $page = bin2hex(\App::$query_string); - - if(! $this->jsdisabled) { - if($test) { - $this->jsdisabled = 1; - if(array_key_exists('jsdisabled',$_COOKIE)) - $this->jsdisabled = $_COOKIE['jsdisabled']; - - if(! array_key_exists('jsdisabled',$_COOKIE)) { - \App::$page['htmlhead'] .= "\r\n" . '<script>document.cookie="jsdisabled=0; path=/"; var jsMatch = /\&jsdisabled=0/; if (!jsMatch.exec(location.href)) { location.href = "' . z_root() . '/nojs/0?f=&redir=' . $page . '" ; }</script>' . "\r\n"; - /* emulate JS cookie if cookies are not accepted */ - if (array_key_exists('jsdisabled',$_GET)) { - $_COOKIE['jsdisabled'] = $_GET['jsdisabled']; - } - } - } - else { - \App::$page['htmlhead'] .= "\r\n" . '<noscript><meta http-equiv="refresh" content="0; url=' . z_root() . '/nojs?f=&redir=' . $page . '"></noscript>' . "\r\n"; - } - } - - } - - function disabled() { - return $this->jsdisabled; - } - - -} - - diff --git a/Zotlabs/Web/HTTPSig.php b/Zotlabs/Web/HTTPSig.php index f27aa0556..fe0b9428f 100644 --- a/Zotlabs/Web/HTTPSig.php +++ b/Zotlabs/Web/HTTPSig.php @@ -342,6 +342,10 @@ class HTTPSig { */ static function parse_sigheader($header) { + if(is_array($header)) { + btlogger('is_array: ' . print_r($header,true)); + } + $ret = []; $matches = []; @@ -397,7 +401,7 @@ class HTTPSig { $data = $matches[1]; if($iv && $key && $alg && $data) { - return crypto_unencapsulate([ 'iv' => $iv, 'key' => $key, 'alg' => $alg, 'data' => $data ] , $prvkey); + return crypto_unencapsulate([ 'encrypted' => true, 'iv' => $iv, 'key' => $key, 'alg' => $alg, 'data' => $data ] , $prvkey); } return ''; |