From 640bead32c4c1bf6f5e4802d7cd8f3dddd6d1a10 Mon Sep 17 00:00:00 2001 From: SpudGunMan Date: Thu, 23 Oct 2025 12:06:45 -0700 Subject: [PATCH] Update locationdata.py --- modules/locationdata.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/locationdata.py b/modules/locationdata.py index a5acdbc..16f2d6b 100644 --- a/modules/locationdata.py +++ b/modules/locationdata.py @@ -11,6 +11,7 @@ from datetime import datetime from modules.log import * import math import csv +import os trap_list_location = ("whereami", "wx", "wxa", "wxalert", "rlist", "ea", "ealert", "riverflow", "valert", "earthquake", "howfar", "map",) @@ -1121,6 +1122,10 @@ def mapHandler(userID, deviceID, channel_number, message): if not description: return "Please provide a description. Type 'map help' for usage." + # Sanitize description for CSV injection + if description and description[0] in ('=', '+', '-', '@'): + description = "'" + description + # location should be a tuple: (lat, lon) if not location or len(location) != 2: return "🚫Location data is missing or invalid."