Skip to content
Snippets Groups Projects
Verified Commit 63b4e749 authored by hanfi's avatar hanfi
Browse files

input sanitation

parent 12f492ab
Branches
No related tags found
Loading
from datetime import datetime
from html import escape
from secrets import token_hex
from cryptography.exceptions import InvalidSignature
......@@ -57,10 +58,10 @@ def update_item(db: Session, item: schemas.Item, data: schemas.ItemUpdate):
verify = ""
if data.addressee:
verify += data.addressee
item.addressee = data.addressee
item.addressee = escape(data.addressee)
if data.team:
verify += data.team
item.team = data.team
item.team = escape(data.team)
if data.amount:
verify += str(data.amount)
item.amount = data.amount
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment