Skip to content

The 'Options' field is not properly escaped, fails when " some_key_without_value: " is present #8

@sirkubax

Description

@sirkubax

It seems, that when in the templates/slack-message.ftl the value ${executionData.argstring} is a
{ 'key': value, 'key2': value, "some_key_without_value": }

Options: app: promo system_version_file: stg_default version_in_system_version_file: version_unknown diff: --diff dont_enable_after_deploy: false dry_run: disable_nagios_probe: True version_override: 0.9.926 verbose: -v

a dry_run: is not empty, it contains ' ' whitespace :) yet it should be escaped...

The slack reject the output.
Is this a Slack issue, or a rundeck-slack plugin escaping issue?


2017-04-13 09:02:11,316 [quartzScheduler_Worker-7] ERROR grails.app.services.rundeck.services.NotificationService - Error sending notification: Notification{eventTrigger='onstart', type='SlackNotification', content='{"username":"Rundeck","external_template":"slack-message.ftl","room":"#rundeck","teamDomain":"x","apiAuthToken":"y","icon_url":""}'}: class com.bitplaces.rundeck.plugins.slack.SlackNotificationPluginException: Unknown status returned from Slack API: [invalid_payload].
com.bitplaces.rundeck.plugins.slack.SlackNotificationPluginException: Unknown status returned from Slack API: [invalid_payload].
        at com.bitplaces.rundeck.plugins.slack.SlackNotificationPlugin.postNotification(SlackNotificationPlugin.java:179)
        at rundeck.services.NotificationService.triggerPlugin(NotificationService.groovy:490)
        at rundeck.services.NotificationService$_triggerJobNotification_closure5.doCall(NotificationService.groovy:352)
        at rundeck.services.NotificationService.triggerJobNotification(NotificationService.groovy:147)
        at rundeck.services.NotificationService$_triggerJobNotification_closure1.doCall(NotificationService.groovy:89)
        at rundeck.services.NotificationService.triggerJobNotification(NotificationService.groovy:86)
        at rundeck.services.ExecutionService.executeAsyncBegin(ExecutionService.groovy:959)
        at rundeck.quartzjobs.ExecutionJob.executeCommand(ExecutionJob.groovy:325)
        at rundeck.quartzjobs.ExecutionJob.execute_internal(ExecutionJob.groovy:143)
        at rundeck.quartzjobs.ExecutionJob$_execute_closure1.doCall(ExecutionJob.groovy:91)
        at com.codahale.metrics.Timer.time(Timer.java:99)
        at rundeck.quartzjobs.ExecutionJob.execute(ExecutionJob.groovy:90)
        at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
        at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions