SwitchBotAPI
SwitchBotAPI copied to clipboard
Invalid/Irregular sanitization of webhook URL protocols
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
- register a webhook with https
https://example.org/webhook - try registering another webhook without https
http://example.org/webhook-> error messagewebhook is exist - attempt deletion of existing https webhook but using the http url
http://example.org/webhook-> gives a success message - attempt registering
http://example.org/webhookagain -> failure, because 3) did not actually delete the webhook, even though it gave a success message - delete
https://example.org/webhook - 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