-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Reject bidirectional formatting characters #11391
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
What do you think about warning on homoglyphs/confusables? https://www.unicode.org/Public/security/10.0.0/confusables.txt |
@fertapric yes, that's a separate problem. Ideally we will merge this with the existing StringTokenizer. We don't need to keep all confusables, only the confusables that are currently valid as identifiers. And we can probably do it all with a single pass. |
assert_eval_raise SyntaxError, | ||
~r"nofile:1:13: invalid bidirectional formatting character in string: \\u202A. If you want to use such character, use it in its escaped \\u202A form instead", | ||
'"this is a \\\u202A"' | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need a test that it is accepted in escaped form?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My answer would be no. We always accept any encoded form.
💚 💙 💜 💛 ❤️ |
No description provided.