Skip to content

A live bird collage card for your Home Assistant dashboard.

Patching minor XSS vulnerability

ehpersonal38e799b7154af1
diff --git a/homepage/views.php b/homepage/views.php
index be4e0e5d..96db5f7b 100644
--- a/homepage/views.php
+++ b/homepage/views.php
@@ -353,7 +353,8 @@ if(isset($_GET['view'])){
$output = implode("\n", $lines);
$results = $output;
-
+ // remove script tags (xss)
+ $results = preg_replace('#<script(.*?)>(.*?)</script>#is', '', $results);
if(strlen($results) == 0) {
$results = "This command has no output.";
}