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
No related branches found
No related tags found
No related merge requests found
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
## [Unreleased] ## [Unreleased]
[Fixed]
- Fixed problem with certificates, which contains scope
## [v1.0.0] ## [v1.0.0]
- First release - First release
......
...@@ -45,10 +45,10 @@ class sspmod_remoteUserSSL_Auth_Source_RemoteUserSSL extends SimpleSAML_Auth_Sou ...@@ -45,10 +45,10 @@ class sspmod_remoteUserSSL_Auth_Source_RemoteUserSSL extends SimpleSAML_Auth_Sou
assert(is_array($state)); assert(is_array($state));
$login = null; $login = null;
if (isset($_SERVER['REMOTE_USER'])) { if (isset($_SERVER['SSL_CLIENT_S_DN'])) {
$login = preg_replace('/^([^@]*).*/', '\1', $_SERVER['REMOTE_USER']);
} elseif (isset($_SERVER['SSL_CLIENT_S_DN'])) {
$login = $_SERVER['SSL_CLIENT_S_DN']; $login = $_SERVER['SSL_CLIENT_S_DN'];
} elseif (isset($_SERVER['REMOTE_USER'])) {
$login = preg_replace('/^([^@]*).*/', '\1', $_SERVER['REMOTE_USER']);
} else { } else {
// Both variables were empty, this shouldn't happen if the web server is properly configured // 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'); \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