summaryrefslogtreecommitdiffstats
path: root/src/etc/inc/openvpn.auth-user.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/etc/inc/openvpn.auth-user.php')
-rw-r--r--src/etc/inc/openvpn.auth-user.php9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/etc/inc/openvpn.auth-user.php b/src/etc/inc/openvpn.auth-user.php
index 0f6864b..a95051d 100644
--- a/src/etc/inc/openvpn.auth-user.php
+++ b/src/etc/inc/openvpn.auth-user.php
@@ -1,6 +1,5 @@
#!/usr/local/bin/php-cgi -f
<?php
-/* $Id$ */
/*
openvpn.auth-user.php
@@ -32,10 +31,6 @@
*/
/*
- pfSense_BUILDER_BINARIES:
- pfSense_MODULE: openvpn
-*/
-/*
* OpenVPN calls this script to authenticate a user
* based on a username and password. We lookup these
* in our config.xml file and check the credentials.
@@ -118,7 +113,7 @@ if (file_exists("{$g['varetc_path']}/openvpn/{$modeid}.ca")) {
$authenticated = false;
-if (($strictusercn === true) && ($common_name != $username)) {
+if (($strictusercn === true) && (mb_strtolower($common_name) !== mb_strtolower($username))) {
syslog(LOG_WARNING, "Username does not match certificate common name ({$username} != {$common_name}), access denied.\n");
if (isset($_GET['username'])) {
echo "FAILED";
@@ -145,7 +140,7 @@ if (!is_array($authmodes)) {
$attributes = array();
foreach ($authmodes as $authmode) {
$authcfg = auth_get_authserver($authmode);
- if (!$authcfg && $authmode != "local") {
+ if (!$authcfg && $authmode != "Local Database") {
continue;
}
OpenPOWER on IntegriCloud