]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/Magic.php
Merge pull request #12895 from HankG/mastodon-status-edit-fix-deleting-all-images
[friendica.git] / src / Module / Magic.php
index 8fa67ec97987431a2758aa01bdb9a8540b894a92..1012dc72baffdbb57fddcb6e69b2ae50e32b7e19 100644 (file)
@@ -88,7 +88,7 @@ class Magic extends BaseModule
                $contact = $this->dba->selectFirst('contact', ['id', 'nurl', 'url'], ['id' => $cid]);
 
                // Redirect if the contact is already authenticated on this site.
-               if ($this->app->getContactId() && strpos($contact['nurl'], Strings::normaliseLink($this->baseUrl->get())) !== false) {
+               if ($this->app->getContactId() && strpos($contact['nurl'], Strings::normaliseLink($this->baseUrl)) !== false) {
                        $this->logger->info('Contact is already authenticated');
                        System::externalRedirect($dest);
                }
@@ -113,7 +113,7 @@ class Magic extends BaseModule
                        $header = HTTPSignature::createSig(
                                $header,
                                $user['prvkey'],
-                               'acct:' . $user['nickname'] . '@' . $this->baseUrl->getHostname() . ($this->baseUrl->getUrlPath() ? '/' . $this->baseUrl->getUrlPath() : '')
+                               'acct:' . $user['nickname'] . '@' . $this->baseUrl->getHost() . ($this->baseUrl->getPath() ? '/' . $this->baseUrl->getPath() : '')
                        );
 
                        // Try to get an authentication token from the other instance.