Problem/Motivation
If the theme query parameter contains a theme that does not exist the \Drupal\system\Controller\ThemeController should error with theme not found but when we added \Drupal\system\Controller\ThemeController::willInstallExperimentalTheme() we broke this because this expects theme to exist but $theme is user input (from the url query param) so this needs to be hardened.
Steps to reproduce
Copy a url to install a theme or set it as default and manipulate the theme value to be one that does not exist.
Proposed resolution
return FALSE from \Drupal\system\Controller\ThemeController::willInstallExperimentalTheme() if the theme does not exist.
Remaining tasks
User interface changes
None
Introduced terminology
N/a
API changes
None
Data model changes
None
Release notes snippet
N/a
Issue fork drupal-3572785
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
alexpottI think this change might be simple enough to fall under the no test needed.
Comment #4
borisson_I agree, this change is very simple.
Comment #8
catchCommitted/pushed to main, 11.x and 11.3.x, thanks!