Skip to content

Inspect special purpose chars using their unicode representation #13676

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

Merged
merged 1 commit into from
Jun 19, 2024

Conversation

sabiwara
Copy link
Contributor

This reduces confusion when working with zero-width characters or alternative spaces.

Relates to #13673

I used this as a base and compared with python which seems to have a similar strategy for almost all of these.

This reduces confusion when working with zero-width characters or alternative spaces.

Relates to elixir-lang#13673
Comment on lines +119 to +121
# Bidirectional general (source of vulnerabilities)
when char in 0x202A..0x202E
when char in 0x2066..0x2069
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's especially good for this one, since we already have something to prevent vulnerabilities around it in the tokenizer:

%% Bidirectional control
%% Retrieved from https://trojansource.codes/trojan-source.pdf
-define(bidi(C), C =:= 16#202A;

@sabiwara sabiwara merged commit 0793fc9 into elixir-lang:main Jun 19, 2024
9 checks passed
@sabiwara sabiwara deleted the inspect-invisible branch June 19, 2024 07:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants