1
0
Fork 0
mirror of https://codeberg.org/demostf/api.git synced 2026-06-03 18:04:08 +02:00

ensure that team names are valid utf8

This commit is contained in:
Robin Appelman 2020-06-11 21:13:16 +02:00
commit 4abec32123

View file

@ -60,6 +60,14 @@ class UploadProvider extends BaseProvider {
return 'Invalid key'; return 'Invalid key';
} }
if (!mb_check_encoding($red, 'UTF-8')) {
$red = 'RED';
}
if (!mb_check_encoding($blu, 'UTF-8')) {
$blu = 'BLU';
}
$hash = hash_file('md5', $demoFile); $hash = hash_file('md5', $demoFile);
$existingDemo = $this->demoProvider->demoIdByHash($hash); $existingDemo = $this->demoProvider->demoIdByHash($hash);