Ticket #1058 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

Give 400 error (not 500) for invalid locale or package_form

Reported by: dread Owned by: dread
Priority: trivial Milestone: ckan-v1.4-sprint-4
Component: ckan Keywords:
Cc: Repository: ckan
Theme: none

Description

Examples which prompt annoying exception emails:

http://ckan.net/locale?locale=ja
Module ckan.i18n:21 in set_session_locale
           assert locale in _KNOWN_LOCALES

A bot has caused these:

http://ca.ckan.net/package/new?package_form=gov
Module ckan.forms.registry:32 in get_fieldset
               raise ValueError('Could not find package_form name %r in those found: \n%r' % (package_form, [en.name for en in entrypoints]))
ValueError: Could not find package_form name u'gov)' in those found: ['gov', 'standard', 'ca']

Change History

comment:1 Changed 3 years ago by dread

  • Status changed from new to closed
  • Resolution set to fixed

Fixed in cset:8e1817ab8d1c on default, ready for 1.4 release.

comment:2 Changed 3 years ago by dread

  • Milestone set to ckan-v1.4-sprint-4
Note: See TracTickets for help on using tickets.