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

Quotes are not escaped in JSON message #15

Open
mbalbus opened this issue Jan 25, 2022 · 0 comments
Open

Quotes are not escaped in JSON message #15

mbalbus opened this issue Jan 25, 2022 · 0 comments

Comments

@mbalbus
Copy link

mbalbus commented Jan 25, 2022

Option argstring breaks JSON when some arguments contain quotes.
Please add escaping for placeholders.

Example rundek job that breaks JSON:

- defaultTab: nodes
  description: ''
  executionEnabled: true
  group: ZZZ
  loglevel: INFO
  name: notification-test
  nodeFilterEditable: true
  nodefilters:
    dispatch:
      excludePrecedence: true
      keepgoing: false
      rankOrder: ascending
      successOnEmptyNodeFilter: false
      threadcount: '1'
    filter: ZZZ
  nodesSelectedByDefault: true
  notification:
    onfailure:
      plugin:
        configuration:
          authentication: None
          body: |
            {
              "name": "Args:",
              "value": "${execution.argstring}"
            }
          contentType: application/json
          method: POST
          remoteUrl: http://SOME_SERVER
          timeout: '30000'
        type: HttpNotification
  notifyAvgDurationThreshold: null
  options:
    - name: returnCode
      required: true
      value: 1
    - name: text
      value: '''value in quotes "ZZZ" '''
  plugins:
    ExecutionLifecycle: {}
  scheduleEnabled: true
  schedules: []
  sequence:
    commands:
      - exec: exit ${option.returnCode}
    keepgoing: false
    strategy: node-first
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant