]> 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 5457b7442734970785055c99a25f20ca8bdc9a47..e1a7b2144842d6b69e47b255c58668f795510b2f 100644 (file)
@@ -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.