mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-15 13:32:59 +02:00
Proxy Portrange beschraenkt Port darf nicht 444 222 81 oder 53 sein und muss zwischen 1 und 65535
git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@558 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8
This commit is contained in:
@@ -203,6 +203,21 @@ sub validport
|
||||
return 0;
|
||||
}
|
||||
|
||||
sub validproxyport
|
||||
{
|
||||
$_ = $_[0];
|
||||
|
||||
if (!/^\d+$/) {
|
||||
return 0; }
|
||||
if (/^0./) {
|
||||
return 0; }
|
||||
if ($_ == 53 || $_ == 222 || $_ == 444 || $_ == 81 ) {
|
||||
return 0; }
|
||||
elsif ($_ >= 1 && $_ <= 65535) {
|
||||
return 1; }
|
||||
return 0;
|
||||
}
|
||||
|
||||
sub validmac
|
||||
{
|
||||
my $checkmac = $_[0];
|
||||
|
||||
@@ -312,7 +312,7 @@ if (($proxysettings{'ACTION'} eq $Lang::tr{'save'}) || ($proxysettings{'ACTION'}
|
||||
$errormessage = $Lang::tr{'invalid input'};
|
||||
goto ERROR;
|
||||
}
|
||||
if (!(&General::validport($proxysettings{'PROXY_PORT'})))
|
||||
if (!(&General::validproxyport($proxysettings{'PROXY_PORT'})))
|
||||
{
|
||||
$errormessage = $Lang::tr{'advproxy errmsg invalid proxy port'};
|
||||
goto ERROR;
|
||||
|
||||
Reference in New Issue
Block a user