Bug #4233
closedInconsistent handling of seperators in easyrule cli
100%
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)