]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
base64_encode/decode -> base64_url_encode/decode
authorJames Walker <walkah@walkah.net>
Tue, 9 Mar 2010 23:12:37 +0000 (18:12 -0500)
committerJames Walker <walkah@walkah.net>
Thu, 11 Mar 2010 19:49:12 +0000 (14:49 -0500)
plugins/OStatus/lib/magicenvelope.php

index fb8c57c7183e6340c0ad7c404f5484e91c1e37b7..e8835165c03b0d3986f6be8b2245be06676bc416 100644 (file)
@@ -70,7 +70,7 @@ class MagicEnvelope
     public function signMessage($text, $mimetype, $keypair)
     {
         $signature_alg = Magicsig::fromString($keypair);
-        $armored_text = base64_encode($text);
+        $armored_text = base64_url_encode($text);
 
         return array(
             'data' => $armored_text,
@@ -108,7 +108,7 @@ class MagicEnvelope
     public function unfold($env)
     {
         $dom = new DOMDocument();
-        $dom->loadXML(base64_decode($env['data']));
+        $dom->loadXML(base64_url_decode($env['data']));
 
         if ($dom->documentElement->tagName != 'entry') {
             return false;
@@ -165,7 +165,7 @@ class MagicEnvelope
             return false;
         }
 
-        $text = base64_decode($env['data']);
+        $text = base64_url_decode($env['data']);
         $signer_uri = $this->getAuthor($text);
 
         try {