Describe the bug
Data source input validation error leads to Stored XSS within Description after creating a device with Malicious code embedded in Description field.
To Reproduce
Steps to reproduce the behavior:
- Navigate to Console -> Create -> New Device
- In Description field, input script payload:
<svg/onload=alert(1)>
- Fill out the rest of the form as normal
- Click Save. After the first click, there will be an error dialog saying Whitelisting is ON (yes, I turned it on this time). However, I was still able to save the "New Device" form by clicking "Save" once again.
- After the message of "Successfully operated", click on "Data Sources" on the top right menu. XSS dialog will pop up.
You might ask me questions about CSP and the whitelisting thing in config.php:
If I turned the whitelisting feature ON? YES
If I fixed html.php to append CSP policy? YES
Screenshots
Describe the bug
Data source input validation error leads to Stored XSS within Description after creating a device with Malicious code embedded in Description field.
To Reproduce
Steps to reproduce the behavior:
<svg/onload=alert(1)>You might ask me questions about CSP and the whitelisting thing in config.php:
If I turned the whitelisting feature ON? YES
If I fixed html.php to append CSP policy? YES
Screenshots