-
Couldn't load subscription status.
- Fork 833
Open
Labels
Area-Compiler-Syntaxlexfilter, indentation and parsinglexfilter, indentation and parsingFeature RequestTracking-External
Milestone
Description
Recently paper called Trojan Source: Invisible Vulnerabilities demonstrates an attack against source code. It uses Unicode bi-direcional overrides to misguide the meaning of code to a human reader.
Repro steps
let access_level = "user"
[<EntryPoint>]
let main _ =
if access_level <> "user (* Check if admin *)" then
printf "You are an admin.\n"
0Only selecting text with mouse over condicional that is possible see some different thing.
Here I have an example to reproduce the problem
Expected behavior
Maybe compiler error which message Invalid unicode character
Actual behavior
You are an admin.
Known workarounds
I don't know
Related information
Crystal lang discussion about this: crystal-lang/crystal#11392
Site about the problem: https://trojansource.codes/
kerams, smoothdeveloper and weslenng
Metadata
Metadata
Assignees
Labels
Area-Compiler-Syntaxlexfilter, indentation and parsinglexfilter, indentation and parsingFeature RequestTracking-External
Type
Projects
Status
New