mirror of
https://github.com/SpudGunMan/meshing-around.git
synced 2026-06-30 06:51:57 +02:00
Update locationdata.py
This commit is contained in:
@@ -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."
|
||||
|
||||
Reference in New Issue
Block a user