fix(wing): the client filter survives cheap evasions; lookalike and reserved folder names are refused (review of #211)

- client pattern is matched against the text and against an NFKC-folded,
  format-character-free, dash-normalised, whitespace-free form
  (non-breaking hyphen, zero-width characters, soft hyphen, line splits,
  fullwidth letters). x/text/unicode/norm was already in the module graph as an
  indirect dependency; this makes it direct, no new download.
- folder/frontmatter wing names must be ASCII (strings.ToLower folds the Kelvin
  sign to 'k') and must not be sources/concepts/entities/wiki; such names are
  never proposed as a wing, and a reserved default is a startup error
Mutation-checked.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-20 20:29:09 +02:00
co-authored by Claude Sonnet 5.5
parent ae02d4764c
commit 6b6d430383
3 changed files with 118 additions and 9 deletions
+1 -1
View File
@@ -69,6 +69,6 @@ require (
golang.org/x/crypto v0.51.0 // indirect
golang.org/x/sync v0.21.0 // indirect
golang.org/x/sys v0.45.0
golang.org/x/text v0.39.0 // indirect
golang.org/x/text v0.39.0
gopkg.in/yaml.v3 v3.0.1
)