-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
"invisible Unicode characters" warning for no technical reason (whitespace) #25087
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Related to: (and maybe more) |
I think VSCode would also "warn" or at least highlight these, but I propose we just introduce a config option where server admins can decide which character classes to warn for - see #23682. |
"I think VSCode would also warn..." is not in any way a technical reason. I consider the warning itself in this case buggy, since there is no reason to show it for the whitespace character: '\f', simply a formfeed. |
It fits the "ambigous" category, but see #23682 (comment) for my proposal that would by default not highlight ambigous characters, only bidi exploits. |
In my opinion this "Ambiguous thing" must have config option to disable this abusive junk entirely and on per-repo basis. Please make an option in config to disable this crippled function for whole instance of gitea and setting to enable/disable this ambi-crap (to allow paranoids feel pseudo-safeness). |
Yes! There is nothing "ambiguous" about a formfeed anyway. Computing is not about ambiguity. Either there we find a char introducing some attack vector, or we do not. Formfeed does not. So there is nothing to warn about it => it's a bug! |
#23682 has some suggestions for a fix, let's move the discussion there, we don't need two issues open for it. |
Description
Hello gitea,
I'm a codeberg user. Lately I found, that for formfeeds ('\f’) an inappropriate warning is shown on top of the code, plus the formfeed characters are hidden behind a warning icon (see [https://codeberg.org/Foxglove/tileserver/src/branch/main/tileserver.pl]). Thus hiding the character warned of making the decision in favour of that piece of source code a lot harder.
I now learned, that codeberg is "following upstream and will never fork", plus the code that does the inappropriate warning and the information-hiding is part of gitea.
Why I consider this a bug
Although this might install some false fealing of security in the faint of heart (and/or bad informed), it will in the most part shy away those people, rendering publishing of source code on codeberg (through gitea) useless for me and, maybe others.
Imagine the emacs people would resort to host one of the oldest and most active open source projects through gitea:
Is there a possiblity to get rid of the faulty code, or complement it with some sensible test for attack vectors?
Best wishes,
Gitea Version
Current codeberg's version (as of 2023-06-05)
Can you reproduce the bug on the Gitea demo site?
Yes
Log Gist
No response
Screenshots
Git Version
No response
Operating System
No response
How are you running Gitea?
I'm a codeberg user, and was told, the warning is produced in gitea (https://codeberg.org/Codeberg/Community/issues/1030#issuecomment-929035
Database
None
The text was updated successfully, but these errors were encountered: