Project

General

Profile

Actions

Bug #4233

closed

Inconsistent handling of seperators in easyrule cli

Added by Oliver Welter almost 10 years ago. Updated almost 9 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
Rules / NAT
Target version:
-
Start date:
01/18/2015
Due date:
% Done:

100%

Estimated time:
Plus Target Version:
Release Notes:
Affected Version:
2.1.5
Affected Architecture:
amd64

Description

When making modifications to the alias generated using easyrule CLI tool, there are two issues regarding separators:

1) easyrule adds new IPs (address part of the config array) always to the end of the existing string, prefixing it with a whitespace as seperator. In case no alias is in the alias list (which is possible using the UI), you will receive an empty item in the blocked ips list.

2) easyrule adds the seperator for the description (detail part in the config array) at the end, the webui does not add a seperator at the end. After mangling the alias list using the webui and adding a new item using the CLI, the details list has two items without seperator in between.

Suggested fix: To make it consistend add the seperator in easyrule to the front on adding (fixes 2) and check if the list is empty (fixes 1)

Actions

Also available in: Atom PDF