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

Invalid/Irregular sanitization of webhook URL protocols #385

Open
reneroth opened this issue Jan 3, 2025 · 0 comments
Open

Invalid/Irregular sanitization of webhook URL protocols #385

reneroth opened this issue Jan 3, 2025 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@reneroth
Copy link

reneroth commented Jan 3, 2025

Analysis

The SwitchBot backend seems to sanitize the protocol on registered webhook URLs irregularily. This might be indicative of a deeper issue, maybe security relevant.

Expected Behavior

Protocol should always or never be taken into account for webhooks.

Steps To Reproduce

  1. register a webhook with https https://example.org/webhook
  2. try registering another webhook without https http://example.org/webhook -> error message webhook is exist
  3. attempt deletion of existing https webhook but using the http url http://example.org/webhook -> gives a success message
  4. attempt registering http://example.org/webhook again -> failure, because 3) did not actually delete the webhook, even though it gave a success message
  5. delete https://example.org/webhook
  6. you are now able to register http://example.org/webhook

This means the system is only SOMETIMES treating http://example.org/webhook and https://example.org/webhook as the same URL.

Logs

n/a

Configuration

n/a

Environment

REST api

Additional Context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants