Debian SSO login fixed

This commit is contained in:
Christoph Haas 2018-08-06 17:53:05 +02:00
parent 4846573304
commit e0b3721804
2 changed files with 2 additions and 5 deletions

View file

@ -25,7 +25,7 @@ class ApplicationController < ActionController::Base
# Only run if the user is not yet logged in
if not user_signed_in?
if debian_sso_dn = request.env['HTTP_X_DEBIAN_SSO_DN']
debian_sso_dn =~ /\/CN=(.+)/
debian_sso_dn =~ /^CN=(.+),/
debian_email = $1
@user = User.where(provider: 'debian-sso', email: debian_email).first_or_create do |user|