Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows path separators are converted to newlines in custom variables #3636

Closed
ggzengel opened this issue Nov 27, 2018 · 0 comments

Comments

@ggzengel
Copy link

commented Nov 27, 2018

\r and perhaps other code sequences are replaced while displaying custom variables.

Expected Behavior

If using vars.path='c:\\remote' I expect to see path c:\remote on service page.

Current Behavior

If using vars.path='c:\\remote' I get path c:
emote on service page.

C:<br>emote

Possible Solution

use encodeHtml for displaying custom variables.

Steps to Reproduce (for bugs)

create a service with custom variable like vars.path=c:\\remote and watch it at /icingaweb2/monitoring/service/show?...

Your Environment

# uname -a
Linux lx-icinga.hq1.local 4.18.0-0.bpo.1-amd64 #1 SMP Debian 4.18.6-1~bpo9+1 (2018-09-13) x86_64 GNU/Linux

# apt list | grep icinga
icinga/stable 1.13.4-2 amd64
icinga-cgi/stable 1.13.4-2 amd64
icinga-cgi-bin/stable 1.13.4-2 amd64
icinga-common/stable 1.13.4-2 all
icinga-core/stable 1.13.4-2 amd64
icinga-dbg/stable 1.13.4-2 amd64
icinga-doc/stable 1.13.4-2 all
icinga-idoutils/stable 1.13.4-2 amd64
icinga2/icinga-stretch,now 2.10.2-1.stretch amd64 [installed]
icinga2-bin/icinga-stretch,now 2.10.2-1.stretch amd64 [installed,automatic]
icinga2-classicui/icinga-stretch 2.9.2-1.stretch all
icinga2-common/icinga-stretch,now 2.10.2-1.stretch all [installed,automatic]
icinga2-dbg/icinga-stretch 2.10.2-1.stretch amd64
icinga2-doc/icinga-stretch,now 2.10.2-1.stretch all [installed,automatic]
icinga2-ido-mysql/icinga-stretch,now 2.10.2-1.stretch amd64 [installed]
icinga2-ido-pgsql/icinga-stretch 2.10.2-1.stretch amd64
icinga2-studio/icinga-stretch 2.8.4-1.stretch amd64
icingabeat/icinga-stretch 6.3.3 amd64
icingacli/icinga-stretch,now 2.6.2-1.stretch all [installed,automatic]
icingaweb2/icinga-stretch,now 2.6.2-1.stretch all [installed]
icingaweb2-common/icinga-stretch,now 2.6.2-1.stretch all [installed,automatic]
icingaweb2-module-doc/icinga-stretch,now 2.6.2-1.stretch all [installed,automatic]
icingaweb2-module-monitoring/icinga-stretch,now 2.6.2-1.stretch all [installed,automatic]
libicinga2/icinga-stretch 2.9.2-1.stretch amd64
php-icinga/icinga-stretch,now 2.6.2-1.stretch all [installed,automatic]
vim-icinga2/icinga-stretch 2.10.2-1.stretch all

@nilmerg nilmerg self-assigned this Apr 9, 2019

@nilmerg nilmerg added this to the 2.6.3 milestone Apr 9, 2019

@nilmerg nilmerg closed this in 924a580 Apr 16, 2019

nilmerg added a commit that referenced this issue Apr 18, 2019

Customvar: Transform only real newlines to `<br>`
fixes #3636

(cherry picked from commit 924a580)
Signed-off-by: Johannes Meyer <johannes.meyer@icinga.com>

@nilmerg nilmerg changed the title mask custom variables against interpretation befor displaying them Windows path separators are converted to newlines in custom variables Apr 24, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.