From 8367cadeeffec4b6792a502847304b17ceba5882 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Tue, 14 Apr 2015 12:27:36 +0200 Subject: [PATCH] dont normalise OpenID URLs and fallback to https if no protocol is specified --- mod/profile.php | 2 +- mod/settings.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/mod/profile.php b/mod/profile.php index bb45d1fec8..e81cfd22c9 100644 --- a/mod/profile.php +++ b/mod/profile.php @@ -44,7 +44,7 @@ function profile_init(&$a) { if(x($a->profile,'openidserver')) $a->page['htmlhead'] .= '' . "\r\n"; if(x($a->profile,'openid')) { - $delegate = ((strstr($a->profile['openid'],'://')) ? $a->profile['openid'] : 'http://' . $a->profile['openid']); + $delegate = ((strstr($a->profile['openid'],'://')) ? $a->profile['openid'] : 'https://' . $a->profile['openid']); $a->page['htmlhead'] .= '' . "\r\n"; } // site block diff --git a/mod/settings.php b/mod/settings.php index 67f8d69a2e..7db196b030 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -474,7 +474,7 @@ function settings_post(&$a) { $str_contact_deny = perms2str($_POST['contact_deny']); $openidserver = $a->user['openidserver']; - $openid = normalise_openid($openid); + //$openid = normalise_openid($openid); // If openid has changed or if there's an openid but no openidserver, try and discover it. @@ -1002,7 +1002,7 @@ function settings_content(&$a) { $openid_field = false; } else { - $openid_field = array('openid_url', t('OpenID:'),$openid, t("\x28Optional\x29 Allow this OpenID to login to this account.")); + $openid_field = array('openid_url', t('OpenID:'),$openid, t("\x28Optional\x29 Allow this OpenID to login to this account."), "", "", "url"); }