In order to mitigate against the brute force attacks against Gitlab accounts, we are moving to all edu-ID Logins. We would like to remind you to link your account with your edu-id. Login will be possible only by edu-ID after November 30, 2021. Here you can find the instructions for linking your account.

If you don't have a SWITCH edu-ID, you can create one with this guide here

kind regards

Commit c19f56bf authored by haemmer's avatar haemmer
Browse files

Implemented #849

parent 81f96da8
......@@ -188,25 +188,26 @@ function getDomainNameFromURIHint(){
global $IDProviders;
$hostname = gethostbyaddr($_SERVER['REMOTE_ADDR']);
if ($hostname == $_SERVER['REMOTE_ADDR']){
$clientHostname = gethostbyaddr($_SERVER['REMOTE_ADDR']);
if ($clientHostname == $_SERVER['REMOTE_ADDR']){
return '-';
// Do we still have something
$domainname = getDomainNameFromURI($hostname);
if ($domainname != ''){
// Find a matching IdP SSO, must be matching the IdP urn
// or at least the last part of the urn
foreach ($IDProviders as $key => $value){
if (preg_match('/'.$domainname.'$/', $key)){
return $key;
} else {
// Get domain name from client host name
$clientDomainName = getDomainNameFromURI($clientHostname);
if ($clientDomainName == ''){
return '-';
// Return first matching IdP entityID that contains the client domain name
foreach ($IDProviders as $key => $value){
if (preg_match('/'.$clientDomainName.'/', $key)){
return $key;
// No matching entityID was found
return '-';
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment