IPv6 addresses in a group get 'mangled' after editing (:: being interpreted as a delimiter)

IPv6 addresses get ‘mangled’ after editing groups of bgpPeers.bgpPeerIdentifier which include a number of IPv6 addresses. When the group is intially created with multiple IPv6 entrys it is saved to the database correctly - all addresses appear in the correct format. If I then use the GUI to edit the group the IPv6 addresses all appear on the screen ‘split’ at the ‘::’ characters in the address. If I make a modification to the group (edit/add or whatever) it appears to interpret the ‘::’ character as some kind of delimter and when the group is saved it results in the following:

  1. A space is added after any ‘::’ entry in an IPv6 address
  2. If the character immediately after a ‘::’ is an alpha character ‘a-f’ it will also capitalise this character
  3. Only the last entry (if IPv6) is unaffected

As an example the following might be the initial ‘pattern’ field from the ‘device_groups’ table for a given group:

%bgpPeers.bgpPeerIdentifier != “1234::1” && %bgpPeers.bgpPeerIdentifier != “1234::a2” && %bgpPeers.bgpPeerIdentifier != “1.2.3.4” &&

If then edit the group in any way such as add another entry for address ‘1234::3’ and then save the group the field will appear in the database as follows:

%bgpPeers.bgpPeerIdentifier != “1234:: 1” && %bgpPeers.bgpPeerIdentifier != “1234:: A2” && %bgpPeers.bgpPeerIdentifier != “1.2.3.4” && %bgpPeers.bgpPeerIdentifier != “1234::3” &&

This renders the patterns useless for matching against so I cant use the groups. It doesn’t make any difference what browser is used (Tested on Safari Version 12.0.2 (14606.3.4) and Chrome Version 71.0.3578.98 (Official Build) (64-bit))

Our current LibreNMS deployment is as follows:

Version 1.48.1-70-g2eac72d - Tue Feb 19 2019 19:39:16 GMT+1300
DB Schema 2019_01_16_195644_add_vrf_id_and_bgpLocalAs (131)
Web Server nginx/1.12.2
PHP 7.2.14
MySQL 5.5.60-MariaDB
RRDtool 1.4.8

Out of interest our previous LibreNMS deployment of 1.4.7 also had the same issue

The following is a screenshot of the Device->Manage Group> edit Group view looks like with the IPv6 address ‘split’ (this is represented by a space in the actual Database). This view appears only after the initial creation of the group is already done and you then attempt to edit the existing group