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

fix: add URI validation to webhook connectors #1629

Closed
wants to merge 5 commits into from

Conversation

ev-codes
Copy link
Contributor

@ev-codes ev-codes commented Jan 3, 2024

Description

Check that webhook ID contains only valid URI characters as outlined in RFC 3986 for the following:

  • Webhook Start Event Connector
  • Webhook Intermediate Event Connector

Before:
Screenshot 2024-01-03 at 16 04 44

After:
Screenshot 2024-01-03 at 16 05 56

Webhook ID's form part of a URL. As such, the ID needs to be a valid URI in order to prevent obviously malformed URL's. See #1238 for more details.

More Details

Allowing "/"

There was discussion in #1238 to disallow the forward slash "/" as this could be misconstrued as a path delimiter.

I personally feel we should still allow "/" because it is still syntactically correct. I don't want to enforce semantics, as it's possible there are some use cases where a Webhook ID could have a "/".

Test Cases

Checked the following for all connectors in Desktop Modeller:

Should show error message:

  • "Start event"
  • "Start event€"
  • " Start event "

Should not show error message:

  • "12345"
  • "abcde"
  • "_start_event_"
  • "%20start%20event%20"

Next Steps

  • Other generic webhook connectors (e.g., webhook-connector-boundary)
  • 3rd party service webhook connectors (e.g., Twilio)

I wanted to wait to get feedback on my first implementation before expanding this approach to many other connectors.

Related issues

#1238

@ev-codes ev-codes changed the title Add URI validation to Webhook Connectors fix: add URI validation to webhook connectors Jan 3, 2024
@ev-codes
Copy link
Contributor Author

ev-codes commented Jan 4, 2024

Closing for now while we pause work on #1238. See issue for more details.

@ev-codes ev-codes closed this Jan 4, 2024
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

Successfully merging this pull request may close these issues.

1 participant