Skip to content

Commit

Permalink
Fix stored xss in nicedit
Browse files Browse the repository at this point in the history
  • Loading branch information
Ahmad Gneady committed Jul 3, 2021
1 parent f15ab92 commit 5c122df
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/invoices_dml.php
Expand Up @@ -573,7 +573,7 @@ function client_reload__RAND__() {
$templateCode = str_replace('<%%VALUE(total)%%>', safe_html($urow['total']), $templateCode);
$templateCode = str_replace('<%%URLVALUE(total)%%>', urlencode($urow['total']), $templateCode);
if($AllowUpdate || $AllowInsert) {
$templateCode = str_replace('<%%HTMLAREA(comments)%%>', '<textarea name="comments" id="comments" rows="5">' . html_attr($row['comments']) . '</textarea>', $templateCode);
$templateCode = str_replace('<%%HTMLAREA(comments)%%>', '<textarea name="comments" id="comments" rows="5">' . safe_html(htmlspecialchars_decode($row['comments'])) . '</textarea>', $templateCode);
} else {
$templateCode = str_replace('<%%HTMLAREA(comments)%%>', '<div id="comments" class="form-control-static">' . $row['comments'] . '</div>', $templateCode);
}
Expand Down

0 comments on commit 5c122df

Please sign in to comment.