Menu

#2293 Right to left text and security

Bug
closed-invalid
nobody
scintilla (611)
5
2021-12-06
2021-11-07
Ale Vesely
No

Trojan Source reported source code attacks, including commenting out using RTL like so:

#include <stdio.h>
#include <stdbool.h>

int main() {
    bool isAdmin = false;
    /*‮ } ⁦if (isAdmin)⁩ ⁦ begin admins only */
        printf("You are an admin.\n");
    /* end admins only ‮ { ⁦*/
    return 0;
}

The appearance of that code in Geany is shown in bug 2981.

I don't know Geany code. A developers says this issue —even a decision to postpone a complete solution and provide just a quick patch to avoid the worst— should be coordinated with Scintilla.

Discussion

  • Neil Hodgson

    Neil Hodgson - 2021-11-07

    I'm not sure there is a need to do anything. This is similar to homograph spoofing attacks.

    Directional overrides are a valid Unicode feature needed to show text in accordance with the author's intent. Scintilla should follow directional overrides in situations where they currently aren't being followed.

    If you want to show (and disrupt) directional overrides, then assign them representations:
    https://www.scintilla.org/ScintillaDoc.html#CharacterRepresentations

    With SciTE, for example, set:

    representations=\u202E=RLO,\u2066=LRI,\u2067=RLI,\u2069=PDI
    

    The file will then appear as:

     
  • Neil Hodgson

    Neil Hodgson - 2021-11-12
    • labels: --> scintilla
    • status: open --> open-invalid
     
  • Neil Hodgson

    Neil Hodgson - 2021-11-12

    Rejecting this bug report as Scintilla is behaving correctly.

     
  • Ale Vesely

    Ale Vesely - 2021-11-13

    Thank you, Neil

     
  • Neil Hodgson

    Neil Hodgson - 2021-12-06
    • status: open-invalid --> closed-invalid
     

Log in to post a comment.

MongoDB Logo MongoDB