Skip to content

Commit

Permalink
Small correction to filename length check
Browse files Browse the repository at this point in the history
  • Loading branch information
SL-Gundam committed Oct 7, 2021
1 parent 3f3029f commit 7b3c347
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/mail_api.php
Expand Up @@ -1234,7 +1234,7 @@ private function add_file( $p_bug_id, &$p_part, $p_bugnote_id = NULL )
}

// check max length filename. Shorten if necessary. Leave room for file number.
if ( strlen( $t_file_name ) > 245 )
if ( strlen( $t_file_name ) > ( 245 - strlen( $t_extension ) ) )
{
$t_file_name = substr( $t_file_name, 0, ( 245 - strlen( $t_extension ) ) );
}
Expand Down

0 comments on commit 7b3c347

Please sign in to comment.