- Affected version
- 2.1.10 Patch 2
If a non-numerical value is passed via 's' or 'l', then these will clamp to 0. However it is then possible the requested templates may not exist in the master style vs a child style.
For example this request data;
Throws this error;
This is because the include template only exists in the main selectable style, not the master.
PHP:
$input = $request->filter([
'css' => 'str',
's' => 'uint',
'l' => 'uint',
'k' => 'str'
]);
For example this request data;
Code:
array(4) {
["url"] => string(624) "/css.php?css=<redacted>&s=%270%3d1&l=1&d=1597636077&k=1e7730f270c416a5d36b77848c4cb6c22e7c223d"
["referrer"] => bool(false)
["_GET"] => array(5) {
["css"] => string(540) "<redacted>"
["s"] => string(4) "'0=1"
["l"] => string(1) "1"
["d"] => string(10) "1597636077"
["k"] => string(40) "1e7730f270c416a5d36b77848c4cb6c22e7c223d"
}
["_POST"] => array(0) {
}
}
Throws this error;
Code:
ErrorException: Template error: Template public:uix_icons.less is unknown
src/XF/Template/Templater.php:618
Generated by: Unknown account
#0 [internal function]: XF\Template\Templater->handleTemplateError()
#1 src/XF/Template/Templater.php(618): trigger_error()
#2 src/XF/Template/Templater.php(580): XF\Template\Templater->getTemplateData()
#3 src/XF/Template/Templater.php(700): XF\Template\Templater->getTemplateMacro()
#4 internal_data/code_cache/templates/l1/s0/public/<redacted>.less.php(8): XF\Template\Templater->callMacro()
#5 src/XF/Template/Templater.php(1315): XF\Template\Templater->{closure}()
#6 src/XF/CssRenderer.php(323): XF\Template\Templater->renderTemplate()
#7 src/XF/CssRenderer.php(250): XF\CssRenderer->renderTemplate()
#8 src/XF/CssRenderer.php(116): XF\CssRenderer->renderTemplates()
#9 src/XF/CssWriter.php(53): XF\CssRenderer->render()
#10 src/addons/SV/RedisCache/XF/CssWriter.php(37): XF\CssWriter->run()
#11 css.php(30): SV\RedisCache\XF\CssWriter->run()
#12 {main}
This is because the include template only exists in the main selectable style, not the master.