You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the Webhook Channel Configuration HTTP Method and Response Status Codes could be stricter in what input they accept.
Response Status Codes are likely always [0-9]+ and HTTP Method an enum (get, post, etc...)
2024-07-25T10:08:34.214Z ERROR channel Failed to set channel plugin config, terminating the plugin {"id": 2, "name": "Captain Hook", "error": "failed to set plugin config: cannot convert status code \"Lorem ipsum dolor sit amet\" to int: strconv.Atoi: parsing \"Lorem ipsum dolor sit amet\": invalid syntax"}
Also the values could use a trim before being used, not sure if the backend or frontend should do that:
2024-07-25T10:09:56.207Z ERROR channel Failed to set channel plugin config, terminating the plugin {"id": 2, "name": "Captain Hook", "error": "failed to set plugin config: cannot convert status code \" 200 \" to int: strconv.Atoi: parsing \" 200 \": invalid syntax"}
Those sneaky whitespaces
The text was updated successfully, but these errors were encountered:
martialblog
changed the title
Webhook Channel Configuration could be stricter use trim
Webhook Channel Configuration could be stricter and use trim
Jul 25, 2024
I would advise against trimming strings in web, as there might be the obscure case for obscure channels where either leading or trailing spaces are necessary. Thus, I would prefer to address Icinga/icinga-notifications#255 on the daemon side.
Hi,
the Webhook Channel Configuration HTTP Method and Response Status Codes could be stricter in what input they accept.
Response Status Codes are likely always
[0-9]+
and HTTP Method an enum (get, post, etc...)2024-07-25T10:08:34.214Z ERROR channel Failed to set channel plugin config, terminating the plugin {"id": 2, "name": "Captain Hook", "error": "failed to set plugin config: cannot convert status code \"Lorem ipsum dolor sit amet\" to int: strconv.Atoi: parsing \"Lorem ipsum dolor sit amet\": invalid syntax"}
Also the values could use a trim before being used, not sure if the backend or frontend should do that:
2024-07-25T10:09:56.207Z ERROR channel Failed to set channel plugin config, terminating the plugin {"id": 2, "name": "Captain Hook", "error": "failed to set plugin config: cannot convert status code \" 200 \" to int: strconv.Atoi: parsing \" 200 \": invalid syntax"}
Those sneaky whitespaces
The text was updated successfully, but these errors were encountered: