From: Michael Tremer <michael.tremer@ipfire.org>
To: development@lists.ipfire.org
Subject: Re: [PATCH] ovpnmain.cgi: Validate CCDNet name when renaming it.
Date: Thu, 30 Jan 2020 12:55:25 +0000 [thread overview]
Message-ID: <9E24A6A5-BB35-4984-A25E-CF95FBF083BB@ipfire.org> (raw)
In-Reply-To: <36112b13c62f8e7eea3cda466ed8520dcac14d6a.camel@ipfire.org>
[-- Attachment #1: Type: text/plain, Size: 1442 bytes --]
Okay. Can you ask the reporter to check your changes and confirm here on the list?
> On 30 Jan 2020, at 12:48, Stefan Schantl <stefan.schantl(a)ipfire.org> wrote:
>
> Hello Michael,
>
> thanks for reviewing the patch.
>
> There is no need that the pool name is a FQDN, I mainly inserted the
> same check when editing as when adding a new pool.
>
> Best regards,
>
> -Stefan
>> Hi,
>>
>>> On 28 Jan 2020, at 10:51, Stefan Schantl <stefan.schantl(a)ipfire.org
>>>> wrote:
>>>
>>> Fixes #12282
>>>
>>> Signed-off-by: Stefan Schantl <stefan.schantl(a)ipfire.org>
>>> ---
>>> html/cgi-bin/ovpnmain.cgi | 7 +++++++
>>> 1 file changed, 7 insertions(+)
>>>
>>> diff --git a/html/cgi-bin/ovpnmain.cgi b/html/cgi-bin/ovpnmain.cgi
>>> index e76a688fe..22a2b9905 100644
>>> --- a/html/cgi-bin/ovpnmain.cgi
>>> +++ b/html/cgi-bin/ovpnmain.cgi
>>> @@ -490,6 +490,13 @@ sub modccdnet
>>> my $oldname=$_[1];
>>> my %ccdconfhash=();
>>> my %ccdhash=();
>>> +
>>> + # Check if the new name is valid.
>>> + if(!&General::validhostname($newname)) {
>>> + $errormessage=$Lang::tr{'ccd err invalidname'};
>>> + return;
>>> + }
>>> +
>>
>> Why does the name of the pool need to be a FQDN?
>>
>>> &General::readhasharray("${General::swroot}/ovpn/ccd.conf",
>>> \%ccdconfhash);
>>> foreach my $key (keys %ccdconfhash) {
>>> if ($ccdconfhash{$key}[0] eq $oldname) {
>>> --
>>> 2.25.0
>>>
>
next parent reply other threads:[~2020-01-30 12:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <36112b13c62f8e7eea3cda466ed8520dcac14d6a.camel@ipfire.org>
2020-01-30 12:55 ` Michael Tremer [this message]
2020-01-28 10:51 Stefan Schantl
2020-01-28 15:33 ` Michael Tremer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9E24A6A5-BB35-4984-A25E-CF95FBF083BB@ipfire.org \
--to=michael.tremer@ipfire.org \
--cc=development@lists.ipfire.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox