Description
Super minor issue in and of itself. Really only dropping it here in case it might have larger consequences I'm not considering.
found on 7.5.19 and still exists on 7.5.27
Description of the problem
On an MSM installation, directly requesting a switch to a site that the current
member cannot access produces HTTP 500 instead of a handled authorization denial.
The reporter's manual reproduction shows an InvalidArgumentException for the
missing jquery property while rendering the CP FileNotFound error page.
The unauthorized site is correctly absent from the CP site switcher. No access
to that site was demonstrated. This report concerns the broken error response,
not a confirmed authorization bypass.
How to reproduce
-
Use an MSM installation with sites 1 and 2.
-
Give a non-superadmin member CP access to site 2, but not site 1.
-
Log in as that member and verify site 2 works. T
-
Confirm site 1 is absent from the CP site switcher, as expected.
-
While in that member's session, directly navigate to:
/admin.php?/cp/msm/switch_to/1&S=CURRENT_MEMBER_SESSION -
Observe the error page and HTTP 500 response.
Expected: a handled denial without switching to the unauthorized site, and
without crashing the CP error renderer.
Actual: the exception below; no successful access to site 1 was observed.
Error messages
Transcribed from the reporter's screenshot:
InvalidArgumentException Caught
No such property: 'jquery' on ExpressionEngine\Legacy\Facade
ee/ExpressionEngine/Legacy/Facade.php:128
Relevant visible stack frames (the screenshot truncates some arguments):
#0 ee/ExpressionEngine/Legacy/Facade.php(35): ExpressionEngine\Legacy\Facade->get('jquery')
#1 ee/legacy/libraries/Cp.php(335): ExpressionEngine\Legacy\Facade->__get('jquery')
#2 ee/ExpressionEngine/Controller/Error/FileNotFound.php(31): Cp->render('errors/file_not...', Array)
#3 [internal function]: ExpressionEngine\Controller\Error\FileNotFound->index('cp/login&return...')
#4 ee/ExpressionEngine/Core/Core.php(269): call_user_func_array(Array, Array)
#5 ee/ExpressionEngine/Core/Core.php(280): ExpressionEngine\Core\Core->runController(Array)
#6 ee/ExpressionEngine/Core/Core.php(125): ExpressionEngine\Core\Core->runController(Array)
Consider this low-priority error handling based on current evidence. It may be
worth checking whether the missing dependency affects other early CP error paths,
but broader impact has not been demonstrated. No EE source patches were made
to work around the failure.
Activity