Skip to content
Snippets Groups Projects
Commit 37f25e82 authored by Pavel Vyskočil's avatar Pavel Vyskočil
Browse files

Fixed problem with certificates, which contains scope

* Description of problem: Class RemoteUserSSL.php used only the part of certificate before '@' and this identifier didn't match with certificate stored in Perun (with scope).

* Solution: Try to use  $_SERVER['SSL_CLIENT_S_DN'] as first
parent ab9a64cb
Branches
Tags
No related merge requests found
......@@ -2,6 +2,8 @@
All notable changes to this project will be documented in this file.
## [Unreleased]
[Fixed]
- Fixed problem with certificates, which contains scope
## [v1.0.0]
- First release
......
......@@ -45,10 +45,10 @@ class sspmod_remoteUserSSL_Auth_Source_RemoteUserSSL extends SimpleSAML_Auth_Sou
assert(is_array($state));
$login = null;
if (isset($_SERVER['REMOTE_USER'])) {
$login = preg_replace('/^([^@]*).*/', '\1', $_SERVER['REMOTE_USER']);
} elseif (isset($_SERVER['SSL_CLIENT_S_DN'])) {
if (isset($_SERVER['SSL_CLIENT_S_DN'])) {
$login = $_SERVER['SSL_CLIENT_S_DN'];
} elseif (isset($_SERVER['REMOTE_USER'])) {
$login = preg_replace('/^([^@]*).*/', '\1', $_SERVER['REMOTE_USER']);
} else {
// Both variables were empty, this shouldn't happen if the web server is properly configured
\SimpleSAML\Logger::error('remoteUserSSL: user entered protected area without being properly authenticated');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment