diff options
Diffstat (limited to 'git-hooks')
-rwxr-xr-x | git-hooks/sanitize-commit | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/git-hooks/sanitize-commit b/git-hooks/sanitize-commit index 3970789..5a95ca1 100755 --- a/git-hooks/sanitize-commit +++ b/git-hooks/sanitize-commit @@ -837,6 +837,11 @@ while (<DIFF>) { complain_ln("__OBJC__ will never be defined for non-Objective-C/C++ source files", "objc"); } } + # Check for Unicode Bi-directional Override exploit characters. + # See https://trojansource.codes/ + if (/[\x{202A}-\x{202E}\x{2066}-\x{2069}]/) { + complain_ln("Unicode bi-directional override characters", "bidi", 1) + } } else { flushChunk() if ($chunk); if (/^ /) { |