Addons-frontend: Page not found (404) error when too many spaces are typed in the collection slug

Created on 5 Apr 2018  路  5Comments  路  Source: mozilla/addons-frontend

STR:

  1. Load AMO dev and go to a collection to Edit this collection.
  2. In the collection slug type in many spaces before the name of the collection.
  3. Click on Save Collection.

Expected result:
Red message " The custom URL must consist of letters, numbers, underscores or hyphens" should be displayed.

Actual result:
404 Page not found.

Notes:
This issue is reproducible with FF59(Win10) on AMO dev.

the many spaces

page not found

collections assigned p3 verified fixed bug

Most helpful comment

Okay trimming will resolve the issue, as backend API has trimming and check for max 30 characters.

i will give a patch soon.

All 5 comments

@tofumatt, I am not sure but can trimming the blank spaces before submit help? ideally we should trim spaces before submitting form.

Okay trimming will resolve the issue, as backend API has trimming and check for max 30 characters.

i will give a patch soon.

Thanks for the suggestion and the offer to fix it @tsl143!

Done :)

Verified fixed on AMO dev with FF59(win10).

30 characters

testing spaces

Was this page helpful?
0 / 5 - 0 ratings