form-render-escaping.json 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. {
  2. "name": "verify-form-render-escaping",
  3. "nodes": [
  4. {"id": "n1", "name": "Form", "type": "form-trigger", "position": {"x": 0, "y": 0},
  5. "config": {"title": "<script>alert(1)</script>",
  6. "description": "a \"quoted\" & <b>bold</b> description",
  7. "path": "/x\"><script>x4</script>",
  8. "fields": [
  9. {"name": "q", "label": "<img src=x onerror=alert(2)>", "type": "text"},
  10. {"name": "ph", "label": "Placeholder field", "type": "text",
  11. "placeholder": "\"><script>x1</script>"},
  12. {"name": "sel", "label": "Select field", "type": "select",
  13. "options": ["\"><script>x2</script>"]},
  14. {"name": "file1", "label": "File field", "type": "file",
  15. "accept": "\"><script>x3</script>"}
  16. ]}}
  17. ],
  18. "connections": [],
  19. "http": {
  20. "method": "GET",
  21. "path": "/webhook/{workflowId}/x%22%3E%3Cscript%3Ex4%3C/script%3E",
  22. "expectStatus": 200,
  23. "expectBodyContains": [
  24. "&lt;script&gt;alert(1)&lt;/script&gt;",
  25. "&lt;img src=x onerror=alert(2)&gt;",
  26. "&amp;",
  27. "&quot;&gt;&lt;script&gt;x1&lt;/script&gt;",
  28. "&quot;&gt;&lt;script&gt;x2&lt;/script&gt;",
  29. "&quot;&gt;&lt;script&gt;x3&lt;/script&gt;",
  30. "/x&quot;&gt;&lt;script&gt;x4&lt;/script&gt;"
  31. ],
  32. "expectBodyExcludes": [
  33. "<script>alert(1)</script>",
  34. "<img src=x onerror",
  35. "\"><script>x1</script>",
  36. "\"><script>x2</script>",
  37. "\"><script>x3</script>",
  38. "\"><script>x4</script>"
  39. ]
  40. }
  41. }