Skip to content
This repository was archived by the owner on Sep 2, 2025. It is now read-only.

Commit 15b5ece

Browse files
Merge pull request #94 from tranmh/xss_static_qrcode
Fix Security: Stored Cross Site Scripting for static QR code
2 parents 2287d98 + b03238b commit 15b5ece

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lib/StaticQrcode/StaticQrcode.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ private function addQrcode($type) {
355355
$data_to_db['type'] = $type;
356356
$data_to_db['format'] = $_POST['format'];
357357
$data_to_db['qrcode'] = $data_to_db['filename'].'.'.$data_to_db['format'];
358-
$data_to_db['content'] = $this->sContent;
358+
$data_to_db['content'] = htmlspecialchars($this->sContent, ENT_QUOTES, 'UTF-8');
359359

360360
if(isset($_POST['level']))
361361
$input_data["level"] = $_POST['level'];

0 commit comments

Comments
 (0)