mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Fix blank/empty lines in some auth syslog messages
This commit is contained in:
parent
87fb98b9ae
commit
882af7b4de
@ -66,7 +66,7 @@ if (!$username || !$password) {
|
||||
$authenticated = false;
|
||||
|
||||
if (($strictusercn === true) && ($common_name != $username)) {
|
||||
syslog(LOG_WARNING, "Username does not match certificate common name ({$username} != {$common_name}), access denied.\n");
|
||||
syslog(LOG_WARNING, "Username does not match certificate common name ({$username} != {$common_name}), access denied.");
|
||||
if (isset($_GET['username'])) {
|
||||
echo "FAILED";
|
||||
closelog();
|
||||
@ -90,7 +90,7 @@ foreach ($authmodes as $authmode) {
|
||||
$user = getUserEntry($username);
|
||||
if (!is_array($user) || !userHasPrivilege($user, "user-ipsec-xauth-dialin")) {
|
||||
$authenticated = false;
|
||||
syslog(LOG_WARNING, "user '{$username}' cannot authenticate through IPsec since the required privileges are missing.\n");
|
||||
syslog(LOG_WARNING, "user '{$username}' cannot authenticate through IPsec since the required privileges are missing.");
|
||||
continue;
|
||||
}
|
||||
}
|
||||
@ -99,7 +99,7 @@ foreach ($authmodes as $authmode) {
|
||||
}
|
||||
|
||||
if ($authenticated == false) {
|
||||
syslog(LOG_WARNING, "user '{$username}' could not authenticate.\n");
|
||||
syslog(LOG_WARNING, "user '{$username}' could not authenticate.");
|
||||
if (isset($_GET['username'])) {
|
||||
echo "FAILED";
|
||||
closelog();
|
||||
@ -114,7 +114,7 @@ if (file_exists("/etc/inc/ipsec.attributes.php")) {
|
||||
include_once("/etc/inc/ipsec.attributes.php");
|
||||
}
|
||||
|
||||
syslog(LOG_NOTICE, "user '{$username}' authenticated\n");
|
||||
syslog(LOG_NOTICE, "user '{$username}' authenticated");
|
||||
closelog();
|
||||
|
||||
if (isset($_GET['username'])) {
|
||||
|
||||
@ -76,7 +76,7 @@ if (file_exists("{$g['varetc_path']}/openvpn/{$modeid}.ca")) {
|
||||
$authenticated = false;
|
||||
|
||||
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");
|
||||
syslog(LOG_WARNING, "Username does not match certificate common name (\"{$username}\" != \"{$common_name}\"), access denied.");
|
||||
if (isset($_GET['username'])) {
|
||||
echo "FAILED";
|
||||
closelog();
|
||||
@ -118,7 +118,7 @@ foreach ($authmodes as $authmode) {
|
||||
}
|
||||
|
||||
if ($authenticated == false) {
|
||||
syslog(LOG_WARNING, "user '{$username}' could not authenticate.\n");
|
||||
syslog(LOG_WARNING, "user '{$username}' could not authenticate.");
|
||||
if (isset($_GET['username'])) {
|
||||
echo "FAILED";
|
||||
closelog();
|
||||
@ -161,7 +161,7 @@ if (!empty($content)) {
|
||||
@file_put_contents("{$g['tmp_path']}/{$username}", $content);
|
||||
}
|
||||
|
||||
syslog(LOG_NOTICE, "user '{$username}' authenticated\n");
|
||||
syslog(LOG_NOTICE, "user '{$username}' authenticated");
|
||||
closelog();
|
||||
|
||||
if (isset($_GET['username'])) {
|
||||
|
||||
@ -61,7 +61,7 @@ foreach ($subj at $s) {
|
||||
//<template>
|
||||
|
||||
if (isset($allowed_depth) && ($cert_depth > $allowed_depth)) {
|
||||
syslog(LOG_WARNING, "Certificate depth {$cert_depth} exceeded max allowed depth of {$allowed_depth}.\n");
|
||||
syslog(LOG_WARNING, "Certificate depth {$cert_depth} exceeded max allowed depth of {$allowed_depth}.");
|
||||
if (isset($_GET['certdepth'])) {
|
||||
echo "FAILED";
|
||||
closelog();
|
||||
@ -73,7 +73,7 @@ if (isset($allowed_depth) && ($cert_depth > $allowed_depth)) {
|
||||
}
|
||||
|
||||
// Debug
|
||||
//syslog(LOG_WARNING, "Found certificate {$argv[2]} with depth {$cert_depth}\n");
|
||||
//syslog(LOG_WARNING, "Found certificate {$argv[2]} with depth {$cert_depth}");
|
||||
|
||||
closelog();
|
||||
if (isset($_GET['certdepth'])) {
|
||||
|
||||
@ -487,7 +487,7 @@ function voucher_configure_zone($sync = false) {
|
||||
$pubkey = base64_decode($config['voucher'][$cpzone]['publickey']);
|
||||
$fd = fopen("{$g['varetc_path']}/voucher_{$cpzone}.public", "w");
|
||||
if (!$fd) {
|
||||
captiveportal_syslog("Voucher error: cannot write voucher.public\n");
|
||||
captiveportal_syslog("Voucher error: cannot write voucher.public");
|
||||
unlock($voucherlck);
|
||||
return 1;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user