Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:cboltz:infra
mediawiki_1_27-OpenID
openID-openSUSE.diff
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File openID-openSUSE.diff of Package mediawiki_1_27-OpenID
--- SpecialOpenIDLogin.body.php 2017-01-31 19:45:03.112000000 +0000 +++ SpecialOpenIDLogin.body.php 2017-05-21 18:53:40.988000000 +0000 @@ -993,6 +993,19 @@ # return the part before the @ in the e-mail address; # look first at SREG, then AX + ### openSUSE-specific patch - get username from openID string + $opensuse_username = str_replace('https://www.opensuse.org/openid/user/', '', $openid); + + if (strpos($opensuse_username, '/') === False) { + return $opensuse_username; + } else { + global $wgSiteNotice; + $wgSiteNotice = "Invalid username '$opensuse_username'. This shouldn't happen ;-) - please send a mail to admin@opensuse.org to get this fixed."; + error_log( "Invalid username '$opensuse_username'. This shouldn't happen ;-) - please send a mail to admin@opensuse.org to get this fixed."); + return; + } + ### end openSUSE-specific patch + if ( array_key_exists( 'email', $sreg ) && Sanitizer::validateEmail( $sreg['email'] ) ) { @@ -1107,7 +1120,8 @@ */ function userNameOK( $name ) { global $wgReservedUsernames; - return ( 0 == User::idFromName( $name ) && + # openSUSE-specific: connecting openID to existing users is fine, therefore do not check and exclude existing users + return ( # 0 == User::idFromName( $name ) && !in_array( $name, $wgReservedUsernames ) ); }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor