Merge pull request #3384 from strk/openid-register
Fix OpenID registration, and improve its robustness
This commit is contained in:
commit
772825690f
1 changed files with 8 additions and 8 deletions
|
@ -73,10 +73,10 @@ function openid_content(App $a) {
|
||||||
$first = notags(trim($v));
|
$first = notags(trim($v));
|
||||||
}
|
}
|
||||||
if($k === 'namePerson') {
|
if($k === 'namePerson') {
|
||||||
$args .= '&username=' . notags(trim($v));
|
$args .= '&username=' . urlencode(notags(trim($v)));
|
||||||
}
|
}
|
||||||
if ($k === 'contact/email') {
|
if ($k === 'contact/email') {
|
||||||
$args .= '&email=' . notags(trim($v));
|
$args .= '&email=' . urlencode(notags(trim($v)));
|
||||||
}
|
}
|
||||||
if ($k === 'media/image/aspect11') {
|
if ($k === 'media/image/aspect11') {
|
||||||
$photosq = bin2hex(trim($v));
|
$photosq = bin2hex(trim($v));
|
||||||
|
@ -87,22 +87,22 @@ function openid_content(App $a) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($nick) {
|
if ($nick) {
|
||||||
$args .= '&nickname=' . $nick;
|
$args .= '&nickname=' . urlencode($nick);
|
||||||
}
|
}
|
||||||
elseif ($first) {
|
elseif ($first) {
|
||||||
$args .= '&nickname=' . $first;
|
$args .= '&nickname=' . urlencode($first);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($photosq) {
|
if ($photosq) {
|
||||||
$args .= '&photo=' . $photosq;
|
$args .= '&photo=' . urlencode($photosq);
|
||||||
}
|
}
|
||||||
elseif ($photo) {
|
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
|
// NOTREACHED
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue