]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/Contact/Redir.php
Don't try to follow remote item from non-URI or scheme-less URI
[friendica.git] / src / Module / Contact / Redir.php
index 4b7360e47182ea626ef692b25ae1332d38f42aad..e1a7b2144842d6b69e47b255c58668f795510b2f 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2010-2022, the Friendica project
+ * @copyright Copyright (C) 2010-2023, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -166,12 +166,12 @@ class Redir extends \Friendica\BaseModule
                }
 
                if ($this->session->getRemoteUserId()) {
-                       $host       = substr($this->baseUrl->getUrlPath() . ($this->baseUrl->getUrlPath() ? '/' . $this->baseUrl->getUrlPath() : ''), strpos($this->baseUrl->getUrlPath(), '://') + 3);
+                       $host       = substr($this->baseUrl->getPath() . ($this->baseUrl->getPath() ? '/' . $this->baseUrl->getPath() : ''), strpos($this->baseUrl->getPath(), '://') + 3);
                        $remotehost = substr($contact['addr'], strpos($contact['addr'], '@') + 1);
 
                        // On a local instance we have to check if the local user has already authenticated
                        // with the local contact. Otherwise, the local user would ask the local contact
-                       // for authentification everytime he/she is visiting a profile page of the local
+                       // for authentication everytime he/she is visiting a profile page of the local
                        // contact.
                        if (($host == $remotehost) && ($this->session->getRemoteContactID($this->session->get('visitor_visiting')) == $this->session->get('visitor_id'))) {
                                // Remote user is already authenticated.