Enable Cyrillic Characters in Attachment File Names (Instructions)

Helpdesk for my helpdesk software

Moderator: mkoch227

Post Reply
shddcit
Posts: 60
Joined: Wed Mar 30, 2022 3:54 pm

Enable Cyrillic Characters in Attachment File Names (Instructions)

Post by shddcit »

This action needs to be performed after each HESK version update.

By default, Hesk removes all characters from file names except for a-z, A-Z, 0-9, . _ -

This is done both for security reasons (to prevent any attempts to pass invalid or malicious file names to Hesk) and to avoid encoding-related issues (for example, if the file name is in a different encoding than UTF-8, such as from email headers).

If you want to allow Cyrillic and other non-latin characters in file names, you will need to remove or comment out this line in inc/posting_functions.inc.php:

Code: Select all

$filename = preg_replace('/[^A-Za-z0-9\.\-_]/','', $filename);
Post Reply