opnsense / core

OPNsense GUI, API and systems backend
https://opnsense.org/
BSD 2-Clause "Simplified" License
3.24k stars 724 forks source link

Comma seperated IP blocks copy paste as Alias return Invalid range error #7541

Open TicTac9k1 opened 2 months ago

TicTac9k1 commented 2 months ago

Important notices

Before you add a new report, we ask you kindly to acknowledge the following:

The issue

When trying to import a comma seperated list of IP blocks as an Alias with Network(s) type, the interface returns an invalid range error while it seemingly does seem to accept copy paste as valid.

No idea if previous versions have the problem, but I am on 24.1.9.

To Reproduce

Create a new firewall Alias and select Network(s) as the type. Copy paste mulitiple comma seperated IP blocks e.g.

181.214.90.0/24, 181.214.234.0/24, 181.214.245.0/24

Visually, the interface appears to accept a comma seperated entry as a valid choice. When saving the alias an error is thrown.

OPNSenseReport

Expected behavior It looks like it would accept comma seperated blocks, therefor it should. But it doesnt.

Describe alternatives you considered Various seperators but only comma seems to indicate that is an accepted format

There is an existing importer that can do raw imports somewhere, without the need of comma seperation. Maybe this function can also be applied here.

fichtner commented 2 months ago

It appears to complain about the embedded newline.