Page MenuHomePhabricator

API allows leading whitespace characters in wiki domains
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

  • create a new wiki with a custom domain that includes whitespace, example (note leading whitespaces): example.com
  • alternatively: add whitespaces to the domain name in the tests, for example L54 & L61 - the test still runs!

What happens?:
An wiki with whitespace chars in its domain name gets successfully created, which is not a valid domain name and makes the wiki unusable for the user.

What should have happened instead?:

  • The API should return an error if a domain name including whitespace characters is submitted
  • An error messag explaining the situation should be displayed to the user

Also we should add test cases for this scenario in these two tests:

Event Timeline

Deniz_WMDE renamed this task from Custom Domains allow whitespace characters to API allows whitespace characters in wiki domains.Oct 20 2022, 11:38 AM
Deniz_WMDE renamed this task from API allows whitespace characters in wiki domains to API allows leading whitespace characters in wiki domains.
Deniz_WMDE updated the task description. (Show Details)
Deniz_WMDE updated the task description. (Show Details)

@Tarrow to check if this is still actually an issue; I think this is now fixed since we sorted out the unicode chars in domains

Tarrow claimed this task.

I checked this on wikibase cloud and it now errors when you try to enter a domain with a space