mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-08-17 01:10:28 +03:00
Meta: Disallow emoji images with invalid code points in their file name
This commit is contained in:
parent
23afb59a3d
commit
006118599c
Notes:
sideshowbarker
2024-07-17 05:05:29 +09:00
Author: https://github.com/trflynn89 Commit: https://github.com/SerenityOS/serenity/commit/006118599c Pull-request: https://github.com/SerenityOS/serenity/pull/15811 Reviewed-by: https://github.com/linusg ✅
@ -52,6 +52,13 @@ def any_problems_here():
|
|||||||
found_invalid_filenames = True
|
found_invalid_filenames = True
|
||||||
break
|
break
|
||||||
|
|
||||||
|
code_points = [int(code_point[len('U+'):], 16) for code_point in filename.split('_')]
|
||||||
|
|
||||||
|
if any(code_point > 0x10ffff for code_point in code_points):
|
||||||
|
print(f'Filename {filename}.png contains a code point exceeding U+10FFFF')
|
||||||
|
found_invalid_filenames = True
|
||||||
|
break
|
||||||
|
|
||||||
return found_invalid_filenames
|
return found_invalid_filenames
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user