mirror of
https://github.com/klezVirus/CVE-2021-40444.git
synced 2024-11-21 21:10:47 +00:00
Added filename length too long check
This commit is contained in:
parent
701acf48f9
commit
835b3db336
1 changed files with 2 additions and 0 deletions
|
@ -193,6 +193,8 @@ def validate_filename(filename):
|
|||
if not filename:
|
||||
filename = ""
|
||||
current_length = len(filename)
|
||||
if current_length > 12:
|
||||
filename = filename[:12]
|
||||
gap = required_length - current_length
|
||||
return filename + ''.join(random.SystemRandom().choice(string.ascii_uppercase + string.digits) for _ in range(gap))
|
||||
|
||||
|
|
Loading…
Reference in a new issue