Skip to content

Commit

Permalink
Fixed issue #19163: [security] Reflected XSS in HtmlEditorPop - Bypas…
Browse files Browse the repository at this point in the history
…sing XSS sanitization function (#3583)
  • Loading branch information
gabrieljenik committed Oct 31, 2023
1 parent 6fff694 commit 4ef1693
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion application/controllers/admin/HtmlEditorPop.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,11 @@ public function index()
$aData['sControlIdDis'] = $aData['sFieldName'] . '_popupctrldis';
$aData['toolbarname'] = 'popup';
$aData['htmlformatoption'] = '';
$aData['contentsLangDirection'] = sanitize_xss_string(App()->request->getQuery('contdir'));
$contentsLangDirection = App()->request->getQuery('contdir');
if (!in_array(strtolower((string) $contentsLangDirection), ['ltr', 'rtl'])) {
$contentsLangDirection = getLanguageRTL(Yii::app()->session['adminlang']) ? 'rtl' : 'ltr';
}
$aData['contentsLangDirection'] = $contentsLangDirection;
if (in_array($aData['sFieldType'], array('email-invitation', 'email-registration', 'email-confirmation', 'email-reminder'))) {
$aData['htmlformatoption'] = ',fullPage:true';
}
Expand Down

0 comments on commit 4ef1693

Please sign in to comment.