Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var BidirectionalCharactersDict = map[rune]string{
0x200E: "LRM",
0x200F: "RLM",
0x061C: "ALM",
0x202A: "LRE",
0x202B: "RLE",
0x202C: "PDF",
0x202D: "LRO",
0x202E: "RLO",
0x2066: "LRI",
0x2067: "RLI",
0x2068: "FSI",
0x2069: "PDI",
}
Global dict for bidirectional characrters
Functions ¶
func ContainBidirectionnal ¶
ContainBidirectionnal reports whether the byte contains bidirectionnal character as defined by Unicode's bidirectional algorithm property; this could lead to Trojan Source vulnerability
func IsBidirectionalAlgorithm ¶
IsBidirectionalAlgorithm reports whether the rune is a bidirectionnal character as defined by Unicode's bidirectional algorithm property; This is: - Implicit Directional Formatting Characters: U+200E (LRM), U+200F (RLM), U+061C (ALM) - Explicit Directional Embedding and Override Formatting Characters: U+202A (LRE), U+202B (RLE), U+202D (LRO), U+202E (RLO), U+202C (PDF) - Explicit Directional Isolate Formatting Characters: U+2066 (LRI), U+2067 (RLI), U+2068 (FSI), U+2069 (PDI).
Types ¶
This section is empty.