console
console copied to clipboard
🐛 Bug Report: Adding Invalid Domain to Function Doesn't Throw an Error
👟 Reproduction steps
Assuming you have a Function in your Project.
- Go to Console > Project
- Navigate to Functions & Select your Function
- Navigate to the Domains Tab & Click on
Create Domain
-
- Write a domain associated with main domain i.e.
appwrite.io
orcloud.appwrite.io
& click on Next - OR Use any domain you like with
http://
orhttps://
- Write a domain associated with main domain i.e.
- Message shows -
✅ Domain verified 🕓 Certificate generation will begin after domain verification
The API call returns an error like this -
-
For first scenario i.e. wrong domain -
{ "message": "You cannot assign your main domain to specific resource. Please use subdomain or a different domain.", "code": 400, "type": "general_argument_invalid", "version": "0.12.143" }
-
For second scenario i.e. with
http*
prefix -{ "message": "Domain may not start with http:\/\/ or https:\/\/.", "code": 400, "type": "general_argument_invalid", "version": "0.12.143" }
👍 Expected behavior
Use the returned Error and show message to the user.
👎 Actual Behavior
Shows Domain verified even in case of errors.
🎲 Appwrite version
Appwrite Cloud
💻 Operating system
Linux
🧱 Your Environment
No response
👀 Have you spent some time to check if this issue has been raised before?
- [X] I checked and didn't find similar issue
🏢 Have you read the Code of Conduct?
- [X] I have read the Code of Conduct
@ItzNotABug, thanks for raising this issue! 🙏🏼 Is this still a problem on 1.5? I think it should have been fixed as part of https://github.com/appwrite/appwrite/issues/5936
@stnguyen90 Issue exists on 1.5.4
too.
Findings on 1.5.4
-
- Using main domain still works as described above. No error is shown
- The second case is handled via the input pattern validation but remove the validation manually and submit the domain, the issue persists
Ahhh I see. We're catching the exception:
https://github.com/appwrite/console/blob/ad764b6265a62bde019f7d9602b871f35c7dc27a/src/lib/pages/domains/wizard/step1.svelte#L29-L32
So the wizard proceeds to the next step.
can I pick this bug?
@tewarig, assigned! Thanks for your interest!
Unassigning due to inactivity.
@stnguyen90 Could you please assign this to me?