JuliaLang / JuliaSyntax.jl

The Julia compiler frontend
Other
274 stars 33 forks source link

Disallow unbalanced bidirectional unicode #288

Closed c42f closed 1 year ago

c42f commented 1 year ago

Disallow unbalanced Unicode bidirectional formatting directives within strings and comments, to mitigate the "trojan source" vulnerability https://www.trojansource.codes

See also https://github.com/JuliaLang/julia/pull/42918

Fix #242 Closes #270

codecov[bot] commented 1 year ago

Codecov Report

Merging #288 (4b427da) into main (6e3782f) will increase coverage by 0.02%. The diff coverage is 96.77%.

@@            Coverage Diff             @@
##             main     #288      +/-   ##
==========================================
+ Coverage   96.73%   96.75%   +0.02%     
==========================================
  Files          14       14              
  Lines        4038     4071      +33     
==========================================
+ Hits         3906     3939      +33     
  Misses        132      132              
Impacted Files Coverage Δ
src/kinds.jl 80.59% <ø> (ø)
src/parser.jl 98.26% <75.00%> (-0.06%) :arrow_down:
src/tokenize.jl 99.06% <98.21%> (+0.17%) :arrow_up:
src/parse_stream.jl 96.42% <100.00%> (+0.01%) :arrow_up: