]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/Magic.php
We are now escaping many template fields
[friendica.git] / src / Module / Magic.php
index 01c5d5d464abf90ba0035a17b2a4f1da92ad8d1f..ecfe18e596b528b3587af7be1ae9b06b7201663a 100644 (file)
@@ -50,7 +50,7 @@ class Magic extends BaseModule
                $contact = DBA::selectFirst('contact', ['id', 'nurl', 'url'], ['id' => $cid]);
 
                // Redirect if the contact is already authenticated on this site.
-               if (!empty($a->contact) && array_key_exists('id', $a->contact) && strpos($contact['nurl'], normalise_link(self::getApp()->getBaseURL())) !== false) {
+               if (!empty($a->contact) && array_key_exists('id', $a->contact) && strpos($contact['nurl'], Strings::normaliseLink(self::getApp()->getBaseURL())) !== false) {
                        if ($test) {
                                $ret['success'] = true;
                                $ret['message'] .= 'Local site - you are already authenticated.' . EOL;
@@ -95,7 +95,7 @@ class Magic extends BaseModule
                                                if ($j['encrypted_token']) {
                                                        // The token is encrypted. If the local user is really the one the other instance
                                                        // thinks he/she is, the token can be decrypted with the local users public key.
-                                                       openssl_private_decrypt(base64url_decode($j['encrypted_token']), $token, $user['prvkey']);
+                                                       openssl_private_decrypt(Strings::base64UrlDecode($j['encrypted_token']), $token, $user['prvkey']);
                                                } else {
                                                        $token = $j['token'];
                                                }