mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-02 01:52:10 +09:00
RVE-2022-3 filter skin parameter in poll module
This commit is contained in:
parent
1672fd8cdc
commit
693fb9e041
2 changed files with 18 additions and 12 deletions
|
|
@ -320,7 +320,15 @@ class pollModel extends poll
|
|||
*/
|
||||
public function getPollGetColorsetList()
|
||||
{
|
||||
$skin = Context::get('skin');
|
||||
$skin = Context::get('skin') ?: 'default';
|
||||
if (!preg_match('/^[a-zA-Z0-9_-]+$/', $skin))
|
||||
{
|
||||
throw new Rhymix\Framework\Exceptions\InvalidRequest();
|
||||
}
|
||||
if (!Rhymix\Framework\Storage::isDirectory(RX_BASEDIR . 'modules/poll/skins/' . $skin))
|
||||
{
|
||||
$skin = 'default';
|
||||
}
|
||||
|
||||
$oModuleModel = getModel('module');
|
||||
$skin_info = $oModuleModel->loadSkinInfo($this->module_path, $skin);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue