diff --git a/modules/openid/openid.inc b/modules/openid/openid.inc index e20cf980668fb283da4c7e9e9ecc36f36526ded5..36717555ae6d57a65d972b9a7e461166eee5775e 100644 --- a/modules/openid/openid.inc +++ b/modules/openid/openid.inc @@ -74,11 +74,14 @@ function openid_redirect_form(&$form_state, $url, $message) { * Determine if the given identifier is an XRI ID. */ function _openid_is_xri($identifier) { - $firstchar = substr($identifier, 0, 1); - if ($firstchar == "@" || $firstchar == "=") - return TRUE; + // Strip the xri:// scheme from the identifier if present. + if (stripos($identifier, 'xri://') !== FALSE) { + $identifier = substr($identifier, 6); + } - if (stristr($identifier, 'xri://') !== FALSE) { + // Test whether the identifier starts with an XRI global context symbol or (. + $firstchar = substr($identifier, 0, 1); + if (strpos("=@+$!(", $firstchar) !== FALSE) { return TRUE; }