]> git.mxchange.org Git - friendica.git/blobdiff - mod/openid.php
Merge pull request #3500 from AndyHee/3.5.2rc
[friendica.git] / mod / openid.php
index b45cd97975e3f7b838b3eb2283cafcd74a4d9f3c..5707b1b72891cc7e28874869aeabc48110a15a8f 100644 (file)
@@ -1,9 +1,9 @@
 <?php
 
+use Friendica\App;
 
 require_once('library/openid.php');
 
-
 function openid_content(App $a) {
 
        $noid = get_config('system','no_openid');
@@ -73,10 +73,10 @@ function openid_content(App $a) {
                                                $first = notags(trim($v));
                                        }
                                        if($k === 'namePerson') {
-                                               $args .= '&username=' . notags(trim($v));
+                                               $args .= '&username=' . urlencode(notags(trim($v)));
                                        }
                                        if ($k === 'contact/email') {
-                                               $args .= '&email=' . notags(trim($v));
+                                               $args .= '&email=' . urlencode(notags(trim($v)));
                                        }
                                        if ($k === 'media/image/aspect11') {
                                                $photosq = bin2hex(trim($v));
@@ -87,22 +87,22 @@ function openid_content(App $a) {
                                }
                        }
                        if ($nick) {
-                               $args .= '&nickname=' . $nick;
+                               $args .= '&nickname=' . urlencode($nick);
                        }
                        elseif ($first) {
-                               $args .= '&nickname=' . $first;
+                               $args .= '&nickname=' . urlencode($first);
                        }
 
                        if ($photosq) {
-                               $args .= '&photo=' . $photosq;
+                               $args .= '&photo=' . urlencode($photosq);
                        }
                        elseif ($photo) {
-                               $args .= '&photo=' . $photo;
+                               $args .= '&photo=' . urlencode($photo);
                        }
 
-                       $args .= '&openid_url=' . notags(trim($authid));
+                       $args .= '&openid_url=' . urlencode(notags(trim($authid)));
 
-                       goaway(App::get_baseurl() . '/register' . $args);
+                       goaway(App::get_baseurl() . '/register?' . $args);
 
                        // NOTREACHED
                }