WeixuanZ / flood-warning-system

Audit required: External control of file name or path PTC-W6004
Security
Minor
a year agoa year old
External variable 'filename' used in file path
 35        data (dict): Json string to be saved
 36        filename (str): Path to file
 37    """
 38    with open(filename, "w") as f: 39        json.dump(data, f)
 40
 41
External variable 'filename' used in file path
 48    Returns:
 49        dict: Json string
 50    """
 51    with open(filename, "r") as f: 52        data = json.load(f)
 53    return data
 54