Skip to content
This repository has been archived by the owner on Apr 4, 2024. It is now read-only.

Commit

Permalink
Merge pull request #1000 from iocage/NAS-102674
Browse files Browse the repository at this point in the history
NAS-102674 / 11.3 / Bug fix for nat forwards prop validation
  • Loading branch information
sonicaj committed Jul 26, 2019
2 parents d94ddaf + 4772ec7 commit c9c848f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions iocage_lib/ioc_json.py
Expand Up @@ -2500,12 +2500,11 @@ def json_check_prop(self, key, value, conf, default=False):

if value != 'none':
regex = re.compile(
r'(^tcp|^udp|^tcp\/udp)\(\d{1,5}((:|-?)'
r'(\d{1,5}))\)'
r'^(tcp|udp|tcp\/udp)\(\d{1,5}((:|-?)(\d{1,5}))\)'
)
for fwd in value.split(','):
# We assume TCP for simpler inputs
fwd = f'tcp({fwd})'
fwd = f'tcp({fwd})' if fwd.isdigit() else fwd
new_value.append(fwd)

match = regex.match(fwd)
Expand Down

0 comments on commit c9c848f

Please sign in to comment.