mirror of
https://github.com/domainaware/parsedmarc.git
synced 2026-05-25 05:15:24 +00:00
Limit filename length to 255 characters
https://github.com/domainaware/parsedmarc/issues/197 Since there is a limit for filename length in some OS, filename length should be limited. I propose limit it to 255 characters.
This commit is contained in:
@@ -395,6 +395,8 @@ def get_filename_safe_string(string):
|
||||
string = string.replace(char, "")
|
||||
string = string.rstrip(".")
|
||||
|
||||
string = (string[:255]) if len(string) > 255 else string
|
||||
|
||||
return string
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user