Services is over-escaping ALL the things #4891

Closed
Gorian opened this Issue Oct 27, 2016 · 1 comment

Projects

None yet

1 participant

@Gorian
Contributor
Gorian commented Oct 27, 2016

DO NOT DELETE THIS INFORMATION.

Please read this information carefully.

  • Is your install up to date? Updating your install
    Please do not submit an issue if your install is not up to date within the last 24 hours or on a stable monthly release.
  • Please include all of the information between the ==================================== section of ./validate.php.
  • If you would like us to add a new device then please provide the information asked for here
  • Please provide as much detail as possible.

LibreNMS Version: 1504c04
DB Schema: 148
PHP: 7.0.11
MySQL: 5.5.50-MariaDB
RRDTool: 1.4.8

SNMP: NET-SNMP 5.7.2

LibreNMS is over-escaping all fields in services. In addition, everytime you edit a service, it escaped things again, even if they've already been escaped. This causes issues in general when using quotes or contractions in the comment, and even worse when adding arguments to a nagios check using long options. In my case, I'm using check_http with the --regex option, which is impossible, because already escaped quotes are being escaped again. --regex={"C":"V"} became {\\\\"C\\\\":\\\\"V\\\\"} after I edited the service to remove quotes from --method="POST", and then a second time to remove the apostrophe in "alert if regex doesn't match {"C":"V"}" in the description field.

image

image

@Gorian
Contributor
Gorian commented Nov 4, 2016 edited

Closing issue - fixed by a251e81

@Gorian Gorian closed this Nov 4, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment