Skip to content

Commit db19d6d

Browse files
MC-41788: Uploader validation update
1 parent 8f33dd5 commit db19d6d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/internal/Magento/Framework/File/Test/Unit/UploaderTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public function getCorrectFileNameProvider()
6262
'a.' . str_repeat('b', 88)
6363
],
6464
[
65-
'a.' . str_repeat('b', 199), // 201 characters
65+
'a.' . str_repeat('b', 89),
6666
true
6767
]
6868
];

lib/internal/Magento/Framework/File/Uploader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,7 @@ public static function getCorrectFileName($fileName)
496496
$fileInfo['extension'] = $fileInfo['extension'] ?? '';
497497

498498
// account for excessively long filenames that cannot be stored completely in database
499-
$maxFilenameLength = 200;
499+
$maxFilenameLength = 90;
500500

501501
if (strlen($fileInfo['basename']) > $maxFilenameLength) {
502502
throw new \LengthException(

0 commit comments

Comments
 (0)