From 1ab1135358e6ab8eb1449029423ab7504da56eb9 Mon Sep 17 00:00:00 2001 From: anupamme Date: Tue, 29 Sep 2026 03:20:19 +0000 Subject: [PATCH] fix: add output encoding in index.html The location search functionality accepts user input through the search field and passes it to searchItem Addresses CWE-79 --- index.html | 3 +++ 1 file changed, 3 insertions(+) diff --git a/index.html b/index.html index 7c9b950..5bf9f6a 100644 --- a/index.html +++ b/index.html @@ -279,6 +279,9 @@ onCallback:function(){ var location = $location.val(); if(location){ + location = location.replace(/[&<>"']/g,function(c){ + return {'&':'&','<':'<','>':'>','"':'"',"'":'''}[c]; + }); result = searchItem.query(location); if(result.length>10){ result = 10;