aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Web
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2022-10-10 18:05:26 +0000
committerMario <mario@mariovavti.com>2022-10-10 18:05:26 +0000
commitef2448e17e742e7dcef458993bce1e0a29756aa7 (patch)
treed23c62753abbb42e7bb742f2d44d09321b6f2eee /Zotlabs/Web
parent6ab65519a0fc3e55ad5f32ce1641190ef609a4e2 (diff)
parent99a5cf1ad4660a31af6c03e5a1abc3d374f82c78 (diff)
downloadvolse-hubzilla-ef2448e17e742e7dcef458993bce1e0a29756aa7.tar.gz
volse-hubzilla-ef2448e17e742e7dcef458993bce1e0a29756aa7.tar.bz2
volse-hubzilla-ef2448e17e742e7dcef458993bce1e0a29756aa7.zip
Merge branch '7.8RC'7.8
Diffstat (limited to 'Zotlabs/Web')
-rw-r--r--Zotlabs/Web/HTTPHeaders.php4
-rw-r--r--Zotlabs/Web/HTTPSig.php6
-rw-r--r--Zotlabs/Web/WebServer.php5
3 files changed, 11 insertions, 4 deletions
diff --git a/Zotlabs/Web/HTTPHeaders.php b/Zotlabs/Web/HTTPHeaders.php
index 4be51a8f3..902d637f7 100644
--- a/Zotlabs/Web/HTTPHeaders.php
+++ b/Zotlabs/Web/HTTPHeaders.php
@@ -20,7 +20,7 @@ class HTTPHeaders {
}
}
else {
- if($this->in_progress['k']) {
+ if(isset($this->in_progress['k'])) {
$this->parsed[] = [ $this->in_progress['k'] => $this->in_progress['v'] ];
$this->in_progress = [];
}
@@ -30,7 +30,7 @@ class HTTPHeaders {
}
}
- if($this->in_progress['k']) {
+ if(isset($this->in_progress['k'])) {
$this->parsed[] = [ $this->in_progress['k'] => $this->in_progress['v'] ];
$this->in_progress = [];
}
diff --git a/Zotlabs/Web/HTTPSig.php b/Zotlabs/Web/HTTPSig.php
index cb41c2b7d..35b8054e6 100644
--- a/Zotlabs/Web/HTTPSig.php
+++ b/Zotlabs/Web/HTTPSig.php
@@ -299,6 +299,7 @@ class HTTPSig {
// Check the local cache first, but remove any fragments like #main-key since these won't be present in our cached data
$url = ((strpos($id, '#')) ? substr($id, 0, strpos($id, '#')) : $id);
+ $best = [];
// $force is used to ignore the local cache and only use the remote data; for instance the cached key might be stale
if (!$force) {
@@ -374,6 +375,8 @@ class HTTPSig {
static function get_webfinger_key($id, $force = false) {
+ $best = [];
+
if (!$force) {
$x = q("select * from xchan left join hubloc on xchan_hash = hubloc_hash where hubloc_id_url = '%s' and hubloc_network in ('zot6', 'activitypub') order by hubloc_id desc",
dbesc($id)
@@ -420,6 +423,9 @@ class HTTPSig {
*/
static function get_zotfinger_key($id, $force = false) {
+
+ $best = [];
+
if (!$force) {
$x = q("select * from xchan left join hubloc on xchan_hash = hubloc_hash where hubloc_id_url = '%s' and hubloc_network = 'zot6' order by hubloc_id desc",
dbesc($id)
diff --git a/Zotlabs/Web/WebServer.php b/Zotlabs/Web/WebServer.php
index 70c6eb9b8..9fa5a7797 100644
--- a/Zotlabs/Web/WebServer.php
+++ b/Zotlabs/Web/WebServer.php
@@ -58,12 +58,13 @@ class WebServer {
if((x($_GET,'zid')) && (! \App::$install)) {
\App::$query_string = strip_zids(\App::$query_string);
if(! local_channel()) {
- if ($_SESSION['my_address']!=$_GET['zid']) {
+ if (!isset($_SESSION['my_address']) || $_SESSION['my_address'] != $_GET['zid']) {
$_SESSION['my_address'] = $_GET['zid'];
$_SESSION['authenticated'] = 0;
}
- if(! $_SESSION['authenticated'])
+ if(!$_SESSION['authenticated']) {
zid_init();
+ }
}
}