Limit state length to 255 characters, fixes #116

This commit is contained in:
Tomaae 2022-02-18 11:01:01 +01:00
parent 054065922d
commit 57a5ae622b

View file

@ -48,7 +48,11 @@ def from_entry(entry, param, default="") -> str:
if param not in entry:
return default
return entry[param]
return (
entry[param][:255]
if isinstance(entry[param], str) and len(entry[param]) > 255
else entry[param]
)
# ---------------------------