Skip to content

Commit

Permalink
minor text cleanup for SWC 130
Browse files Browse the repository at this point in the history
Update SWC-130.md
  • Loading branch information
chaals authored Aug 21, 2023
2 parents 604f5d4 + 82ca2bb commit f6e085a
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions entries/docs/SWC-130.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Please note, this content is no longer actively maintained.

The content of the SWC registry has not been thoroughly updated since 2020. It is known to be incomplete and may contain errors as well as crucial ommissions.
The content of the SWC registry has not been thoroughly updated since 2020. It is known to be incomplete and may contain errors as well as crucial omissions.

For currently maintained guidance on known Smart Contract vulnerabilities written primarily as guidance for security reviewers, please see the
[EEA EthTrust Security Levels specification](https://entethalliance.org/specs/ethtrust-sl). As well as the latest release version, an
Expand All @@ -17,11 +17,6 @@ Right-To-Left-Override control character (U+202E)

[CWE-451: User Interface (UI) Misrepresentation of Critical Information](http://cwe.mitre.org/data/definitions/451.html)

EthTrust Requirements:

- [**[S] No Unicode Direction Control Characters**](https://entethalliance.org/specs/ethtrust-sl/#req-1-unicode-bdo)
- [**[M] No Unnecessary Unicode Controls**](https://entethalliance.org/specs/ethtrust-sl/#req-2-unicode-bdo)
- [**[M] No Homoglyph-style Attack**](https://entethalliance.org/specs/ethtrust-sl/#req-2-no-homoglyph-attack)

## Description

Expand All @@ -35,6 +30,12 @@ There are very few legitimate uses of the U+202E character. It should not appear

- [Outsmarting Smart Contracts](https://youtu.be/P_Mtd5Fc_3E?t=1813)

EEA EthTrust Security Levels specification:

- [**[S] No Unicode Direction Control Characters**](https://entethalliance.org/specs/ethtrust-sl/#req-1-unicode-bdo)
- [**[M] No Unnecessary Unicode Controls**](https://entethalliance.org/specs/ethtrust-sl/#req-2-unicode-bdo)
- [**[M] No Homoglyph-style Attack**](https://entethalliance.org/specs/ethtrust-sl/#req-2-no-homoglyph-attack)

## Samples

### guess_the_number.sol
Expand Down Expand Up @@ -105,7 +106,7 @@ checkAndTransferPrize(/*The prize‮/*rebmun desseug*/n , p/*

inside the function `guess(uint n)` uses invisible direction control characters, so what is present on the screen misrepresents the order
of the parameters - the function is called with parameters `n, p, address`, which is the **logical order** of characters,
but they are displayed from right to left, so that the segment 'n, p' appears in reverse order to a reader,
but some are displayed from right to left, so that the segment 'n, p' appears in reverse order to a reader,
because invisible direction control characters are included in the code.

Selecting the text character by character will usually show this - the selection suddenly jumps to the end of the right-to-left text,
Expand Down

0 comments on commit f6e085a

Please sign in to comment.