X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fopenid.php;h=0ebda485d023a5cf090aed7138a824538f71e7f1;hb=2d63f9deb646d30c60927026b83e08d0f47c381a;hp=bccfcd95c3ce59dd4d4c87f95a6c30a6219224a0;hpb=7fbb51adb9b85ef4b3f53fbb3f9e9c5ee8d0b4ef;p=friendica.git diff --git a/mod/openid.php b/mod/openid.php index bccfcd95c3..0ebda485d0 100644 --- a/mod/openid.php +++ b/mod/openid.php @@ -18,7 +18,6 @@ function openid_content(&$a) { if($openid->validate()) { - #$authid = normalise_openid($_REQUEST['openid_identity']); $authid = $_REQUEST['openid_identity']; if(! strlen($authid)) { @@ -26,10 +25,17 @@ function openid_content(&$a) { goaway(z_root()); } - $r = q("SELECT `user`.*, `user`.`pubkey` as `upubkey`, `user`.`prvkey` as `uprvkey` - FROM `user` WHERE `openid` = '%s' AND `blocked` = 0 - AND `account_expired` = 0 AND `account_removed` = 0 AND `verified` = 1 LIMIT 1", - dbesc($authid) + // NOTE: we search both for normalised and non-normalised form of $authid + // because the normalization step was removed from setting + // mod/settings.php in 8367cad so it might have left mixed + // records in the user table + // + $r = q("SELECT * FROM `user` + WHERE ( `openid` = '%s' OR `openid` = '%s' ) + AND `blocked` = 0 AND `account_expired` = 0 + AND `account_removed` = 0 AND `verified` = 1 + LIMIT 1", + dbesc($authid), dbesc(normalise_openid($authid)) ); if($r && count($r)) {