]> git.mxchange.org Git - friendica.git/commitdiff
Urlencode query parameters
authorSandro Santilli <strk@kbt.io>
Sun, 23 Apr 2017 11:48:46 +0000 (13:48 +0200)
committerSandro Santilli <strk@kbt.io>
Sun, 23 Apr 2017 11:50:33 +0000 (13:50 +0200)
mod/openid.php

index 1841edc5f3c0ebe60262d2550e64e5eb355c0f70..60de55a5098af3e9700d2b7a4a051d6ba5fd081a 100644 (file)
@@ -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,20 +87,20 @@ 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);