mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-09 18:45:54 +02:00
Merge remote-tracking branch 'origin/next'
This commit is contained in:
@@ -756,6 +756,17 @@ sub validdomainname
|
||||
return 1;
|
||||
}
|
||||
|
||||
sub validwildcarddomainname($) {
|
||||
my $domainname = shift;
|
||||
|
||||
# Ignore any leading dots
|
||||
if ($domainname =~ m/^\*\.(.*)/) {
|
||||
$domainname = $1;
|
||||
}
|
||||
|
||||
return &validdomainname($domainname);
|
||||
}
|
||||
|
||||
sub validfqdn
|
||||
{
|
||||
# Checks a fully qualified domain name against RFC1035 and RFC2181
|
||||
|
||||
@@ -4,7 +4,9 @@ opt/pakfire/pakfire
|
||||
srv/web/ipfire/cgi-bin/aliases.cgi
|
||||
srv/web/ipfire/cgi-bin/index.cgi
|
||||
srv/web/ipfire/cgi-bin/ipblocklist.cgi
|
||||
srv/web/ipfire/cgi-bin/mail.cgi
|
||||
srv/web/ipfire/cgi-bin/pakfire.cgi
|
||||
srv/web/ipfire/cgi-bin/proxy.cgi
|
||||
srv/web/ipfire/cgi-bin/services.cgi
|
||||
srv/web/ipfire/cgi-bin/vpnmain.cgi
|
||||
srv/web/ipfire/cgi-bin/vulnerabilities.cgi
|
||||
@@ -22,6 +24,7 @@ usr/share/terminfo/t/tmux-256color
|
||||
usr/share/terminfo/t/tmux-direct
|
||||
var/ipfire/backup/bin/backup.pl
|
||||
var/ipfire/backup/include
|
||||
var/ipfire/general-functions.pl
|
||||
var/ipfire/ipblocklist-functions.pl
|
||||
var/ipfire/menu.d/50-firewall.menu
|
||||
var/ipfire/menu.d/70-log.menu
|
||||
|
||||
@@ -283,6 +283,10 @@ sub checkmailsettings {
|
||||
$errormessage .= "$Lang::tr{'email invalid'} $Lang::tr{'email mailsender'}<br>";
|
||||
}
|
||||
}
|
||||
# Check for a valid recipient
|
||||
if (!&General::validemail($cgiparams{'txt_recipient'})) {
|
||||
$errormessage .= $Lang::tr{'email recipient invalid'} . "<br>";
|
||||
}
|
||||
return $errormessage;
|
||||
}
|
||||
|
||||
|
||||
@@ -2506,6 +2506,7 @@ sub check_acls
|
||||
if ($_)
|
||||
{
|
||||
if (/^\./) { $_ = '*'.$_; }
|
||||
unless (&General::validwildcarddomainname($_)) { $errormessage = $Lang::tr{'advproxy errmsg invalid url'} . ": " . &Header::escape($_); }
|
||||
$proxysettings{'DST_NOCACHE'} .= $_."\n";
|
||||
}
|
||||
}
|
||||
@@ -2604,6 +2605,7 @@ sub check_acls
|
||||
if ($_)
|
||||
{
|
||||
if (/^\./) { $_ = '*'.$_; }
|
||||
unless (&General::validwildcarddomainname($_)) { $errormessage = $Lang::tr{'advproxy errmsg invalid url'} . ": " . &Header::escape($_); }
|
||||
$proxysettings{'DST_NOPROXY_URL'} .= $_."\n";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -301,6 +301,7 @@
|
||||
'advproxy errmsg invalid proxy port' => 'Ungültiger Proxyport',
|
||||
'advproxy errmsg invalid upstream proxy' => 'Ungültige IP/Hostname für vorgelagerten Proxy',
|
||||
'advproxy errmsg invalid upstream proxy username or password setting' => 'Ungültiger Benutzername oder ungültiges Kennwort für vorgelagerten Proxy',
|
||||
'advproxy errmsg invalid url' => 'Ungültige URL',
|
||||
'advproxy errmsg invalid user' => 'Benutzername existiert nicht',
|
||||
'advproxy errmsg ldap base dn' => 'LDAP Base DN erforderlich',
|
||||
'advproxy errmsg ldap bind dn' => 'LDAP Bind DN Benutzername und Passwort erforderlich',
|
||||
@@ -963,6 +964,7 @@
|
||||
'email mailrcpt' => 'E-Mail-Empfänger',
|
||||
'email mailsender' => 'E-Mail-Absender',
|
||||
'email mailuser' => 'Benutzername',
|
||||
'email recipient invalid' => 'Ungültiger Emailempfänger',
|
||||
'email server can not be empty' => 'E-Mail-Server darf nicht leer sein',
|
||||
'email settings' => 'Mailversand',
|
||||
'email subject' => 'IPFire Test-E-Mail',
|
||||
|
||||
@@ -298,6 +298,7 @@
|
||||
'advproxy errmsg invalid proxy port' => 'Invalid proxy port',
|
||||
'advproxy errmsg invalid upstream proxy' => 'Invalid upstream proxy IP/hostname',
|
||||
'advproxy errmsg invalid upstream proxy username or password setting' => 'Invalid upstream proxy username or password setting',
|
||||
'advproxy errmsg invalid url' => 'Invalid URL',
|
||||
'advproxy errmsg invalid user' => 'Username does not exist',
|
||||
'advproxy errmsg ldap base dn' => 'LDAP base DN required',
|
||||
'advproxy errmsg ldap bind dn' => 'LDAP bind DN username and password required',
|
||||
@@ -1004,6 +1005,7 @@
|
||||
'email mailrcpt' => 'Mail Recipient',
|
||||
'email mailsender' => 'Mail Sender',
|
||||
'email mailuser' => 'Username',
|
||||
'email recipient invalid' => 'Invalid email recipient',
|
||||
'email server can not be empty' => 'E-mail server can not be empty',
|
||||
'email settings' => 'Mail Service',
|
||||
'email subject' => 'IPFire Test Mail',
|
||||
|
||||
@@ -28,8 +28,6 @@
|
||||
struct keyvalue *kv = NULL;
|
||||
FILE *file = NULL;
|
||||
|
||||
#define SCOPE 128
|
||||
|
||||
void exithandler(void)
|
||||
{
|
||||
if (kv) freekeyvalues(kv);
|
||||
@@ -125,7 +123,7 @@ int main(void)
|
||||
alias = 0;
|
||||
do {
|
||||
snprintf(command, STRING_SIZE - 1,
|
||||
"ip addr flush dev red%d scope %d 2>/dev/null", alias++, SCOPE);
|
||||
"ip addr flush secondary dev red%d 2>/dev/null", alias++);
|
||||
} while (safe_system(command) == 0);
|
||||
|
||||
/* Now set up the new aliases from the config file */
|
||||
@@ -184,8 +182,8 @@ int main(void)
|
||||
if (!intf)
|
||||
intf = red_dev;
|
||||
|
||||
snprintf(command, STRING_SIZE - 1, "ip addr add %s/%s dev %s scope %d",
|
||||
aliasip, red_netmask, intf, SCOPE);
|
||||
snprintf(command, STRING_SIZE - 1, "ip addr add %s/%s secondary dev %s 2>/dev/null",
|
||||
aliasip, red_netmask, intf);
|
||||
safe_system(command);
|
||||
|
||||
alias++;
|
||||
|
||||
Reference in New Issue
Block a user