Server settings → Plugins: the action dispatcher calls any method named after the posted action, so some answer 500 #484
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#484
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, readingPluginActionView.postand posting unexpected actions in a test.Checked again on 2026-10-01 against
mainat0a5cad587: still present. The code is now atcore/server_views.py:1313-1319(PluginActionView.post) andcore/server_views.py:1463(_switch); the four posted actions fail in the same way.PluginActionView.postresolves its handler withgetattr(self, f"_{action}", None)from the postedaction, so every attribute of the view whose name starts with an underscore, its own and those it inherits fromViewand the mixins, is a reachable action. Those that are not handlers crash the request instead of answering "That is not something this page does."core/server_views.py:1312-1318,PluginActionView.post;core/server_views.py:1462,_switch(self, request, disabled), the helper behind_disableand_enable.server:plugin_actionas an administrator:action=switchraisesTypeError: PluginActionView._switch() missing 1 required positional argument: 'disabled';action=allowed_methodsandaction=_init__raiseTypeErrorfromView._allowed_methodsandView.__init__;action=_eq__handsNotImplementedback as the response, which fails in Django's handler. Each is an Internal Server Error with a traceback in the log.StaffRequiredMixinand CSRF), typically through a stale or hand-built form. Nothing is reached beyond a crash, which is why this is filed as a bug rather than as a security issue.upload,cancel,confirm,refresh,install,disable,enable,remove), for exampleACTIONS = {"upload": "_upload", …}, and refuse anything else with the existing message.Done when
tests/test_server_settings.pyor the file that holds them) gain a test that postsaction=switchandaction=allowed_methodsas an administrator and gets a redirect toserver:pluginswith "That is not something this page does." It fails today with aTypeError.