-
Notifications
You must be signed in to change notification settings - Fork 5k
fix: allow webhooks with IP addresses and private domains #11301
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
base: main
Are you sure you want to change the base?
fix: allow webhooks with IP addresses and private domains #11301
Conversation
Remove PublicDomain validator from webhook URL validation in both createWebhook and updateWebhook endpoints. The URL validator already validates URL structure. PublicDomain rejected IP addresses like http://192.168.1.16:24040/sync which are valid for self-hosted users.
📝 WalkthroughWalkthroughThis change removes the PublicDomain validator from webhook URL validation in the API endpoints. The URL parameter validation for both webhook creation and update endpoints is simplified from a composite validation (checking URL validity and public domain status) to a single URL validator that only ensures http or https schemes. Two corresponding test cases are updated to reflect that webhook operations with private domains and IP addresses now succeed instead of returning 400 status codes. Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
No actionable comments were generated in the recent review. 🎉 Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Security Scan Results for PRDocker Image Scan Results
Source Code Scan Results🎉 No vulnerabilities found! |
This PR removes the restriction that prevented Webhooks from using IP addresses or private domains (like ), which is a common requirement for self-hosted instances. Updated tests to assert success for private IPs. Fixes #7989.