Server settings → Plugins: a mistake in the repository form answers 405 Method Not Allowed instead of the error #491
Labels
No labels
accessibility
authentication
breaking change
bug
documentation
enhancement
interface
internationalisation
observability
performance
security
tier
1
tier
2
tier
3
tier/4
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Postulo/postulo#491
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found on 2026-09-29 in a read-only review of postulo at
95348908d, reading the repository view and posting an invalid form in a test.Checked again on 2026-10-01 against
mainat0a5cad587: still present. The code is now atcore/server_views.py:1279-1281(PluginRepositoryView._save) andcore/server_views.py:936(PluginsView).When the form for adding or editing a plugin repository does not validate, the view hands the POST to
PluginsView, which has noposthandler. Django answers405 Method Not Allowedwith an empty body, so the administrator sees a blank page instead of the error, and what they typed is gone.core/server_views.py:1278-1280(PluginRepositoryView._save:return PluginsView.as_view()(request, repository_form=form));core/server_views.py:935(class PluginsView(ServerSectionMixin, TemplateView), GET only);tests/test_plugin_repositories.py:153-167.action=addwithpublic_key="not base64 at all"toserver:plugin_repositorylogsMethod Not Allowed (POST): /server/plugins/repositories/and answers405with an empty body. The same happens for a bad URL or a duplicate name, and foraction=saveon an existing repository.test_a_key_that_is_not_a_key_is_refusedasserts only that nothing was saved, so it passes against the405.PluginsView(); view.setup(request)and returnview.render_to_response(view.get_context_data(repository_form=form)), or givePluginsViewapostthat delegates toget. Answer200(or422) with the page and the bound form.Done when
tests/test_plugin_repositories.py::test_a_key_that_is_not_a_key_is_refusedalso asserts a200(or422) whose body contains the form's error for the key; it fails today.