forgejo/routers/web/repo/setting
Gusted 5b3a82d621
[FEAT] Enable ambiguous character detection in configured contexts
- The ambiguous character detection is an important security feature to
combat against sourcebase attacks (https://trojansource.codes/).
- However there are a few problems with the feature as it stands
today (i) it's apparantly an big performance hitter, it's twice as slow
as syntax highlighting (ii) it contains false positives, because it's
reporting valid problems but not valid within the context of a
programming language (ambiguous charachters in code comments being a
prime example) that can lead to security issues (iii) charachters from
certain languages always being marked as ambiguous. It's a lot of effort
to fix the aforementioned issues.
- Therefore, make it configurable in which context the ambiguous
character detection should be run, this avoids running detection in all
contexts such as file views, but still enable it in commits and pull
requests diffs where it matters the most. Ideally this also becomes an
per-repository setting, but the code architecture doesn't allow for a
clean implementation of that.
- Adds unit test.
- Adds integration tests to ensure that the contexts and instance-wide
is respected (and that ambigious charachter detection actually work in
different places).
- Ref: https://codeberg.org/forgejo/forgejo/pulls/2395#issuecomment-1575547
- Ref: https://codeberg.org/forgejo/forgejo/issues/564
2024-02-23 13:12:17 +01:00
..
avatar.go Refactor locale&string&template related code (#29165) 2024-02-16 15:20:52 +01:00
collaboration.go [MODERATION] User blocking 2024-02-05 15:56:45 +01:00
default_branch.go Revert "Fix schedule tasks bugs (#28691)" 2024-02-05 16:54:42 +01:00
deploy_key.go
git_hooks.go
lfs.go [FEAT] Enable ambiguous character detection in configured contexts 2024-02-23 13:12:17 +01:00
main_test.go
protected_branch.go Refactor locale&string&template related code (#29165) 2024-02-16 15:20:52 +01:00
protected_tag.go
runners.go
secrets.go
setting.go Add merge style fast-forward-only (#28954) 2024-02-14 17:19:19 +01:00
settings_test.go [MODERATION] User blocking 2024-02-05 15:56:45 +01:00
variables.go
webhook.go Change webhook-type in create-view (#29114) 2024-02-17 23:24:30 +01:00