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
[dev.icinga.com #6088] Multi-line comments don't work #600
Comments
Updated by elippmann on 2014-04-29 14:26:10 +00:00 I'm afraid we don't support Icinga / Icinga 2 :) |
Updated by tgelf on 2014-04-29 14:57:04 +00:00 Btw: when fixing this please read the docs to find out how to safely handle other special characters like semicolons. Cheers, |
Updated by elippmann on 2014-06-02 07:17:58 +00:00
|
Updated by jmeyer on 2014-06-11 07:45:33 +00:00 tgelf wrote:
Which documentation? I could not find anything in the icinga(2) docs related to escaping command arguments. |
Updated by jmeyer on 2014-06-30 08:00:50 +00:00
|
Updated by jmeyer on 2014-07-04 14:27:49 +00:00
Icinga1.x nor Icinga2 is decoding commands. It's just a naive "read, split based on expected arg count and read until EOL". So we do not have any chance to get multiline comments to work, at least for Icinga1.x. Icinga2 might handle new lines better, but this should probably being kept as it is for the sake of compatibility. The two possible solutions I can think of are:
The character encoding does not matter as well. Commands are processed 1:1 so I'd suggest to ensure that commands are in utf-8 when sent. |
Updated by tgelf on 2014-07-04 16:00:57 +00:00 Sending UTF-8 is fine. And it is correct that the core doesn't really care. But if someone enters a newline in the frontend this MUST be handled. Otherwise we allow one to hack in commands he is not authorized for. What we have to do at least is protect us against comments like this:
Legacy frontends care. As far as I know classic does just s/\n/ /. I think we could do even better. What about encoding newlines by transforming them into '\n' - and converting them back by the web interface when showing them? This would allow one to not only safely use but also "see" newlines. Cheers, |
Updated by elippmann on 2014-07-22 13:02:41 +00:00
Escaping line feed (and carriage return) to their textual representation is a good idea and we should implement that. tgelf wrote:
|
Updated by jmeyer on 2014-08-14 06:55:43 +00:00
|
Updated by jmeyer on 2014-08-14 08:23:18 +00:00
Applied in changeset dc8181c. |
Updated by ccesario on 2014-12-16 17:32:07 +00:00 Currently I'm getting a similar problem:
In the comment text area I put
*icinga2 version: v2.2.0-150-g364f1da |
Updated by jmeyer on 2014-12-18 14:31:06 +00:00
Thanks for reporting this regression, i'll fix it asap :) |
Updated by jmeyer on 2014-12-18 14:41:49 +00:00
Applied in changeset 5b1e9be. |
Updated by ccesario on 2014-12-18 15:51:10 +00:00 It's fixed! Thank you @johannes |
This issue has been migrated from Redmine: https://dev.icinga.com/issues/6088
Created by gbeutner on 2014-04-29 12:28:25 +00:00
Assignee: jmeyer
Status: Resolved (closed on 2014-12-18 14:41:49 +00:00)
Target Version: 2.0.0-beta2
Last Update: 2014-12-18 15:51:10 +00:00 (in Redmine)
Try submitting a comment with more than one line. Instead of properly escaping the newline Icinga Web sends two commands:
Changesets
2014-08-14 08:23:04 +00:00 by jmeyer dc8181c
2014-12-18 14:41:35 +00:00 by jmeyer 5b1e9be
The text was updated successfully, but these errors were encountered: