vdxz on Pi with personal data masked: /Users/…/Pictures/261020_14-16-11@2x.jpg
went to the model as /Users/…/Pictures/{{EMAIL_…}}, and Pi could no longer
read the file. A Mac saves an image at twice its size with @2x before its
extension, which the EMAIL rule reads as user@2x.jpg.
realEmail leaves an address whose last label is a file extension no
top-level domain has (fileExt: jpg, png, gif, webp, svg, heic, pdf and
the like; py, md, sh, zip and mov are domains and stay out of it). The
local model's EMAIL spans pass the same check now (modelTakes), so it
can't mask the name the rule leaves. An address beside the file's name
is still masked.
TestFileNameIsNoEmail uses the reporter's path. Broken by hand: with
redact.go as on main the rule's half fails, with model.go as on main the
model's half fails.
Run at this head (on the #3143/#3144 commit, origin/main ba319a758):
- gofmt -l clean; go vet clean on macOS, GOOS=linux -tags nogui and
GOOS=windows.
- go test ./internal/redact ./internal/masking ./internal/gateway
-timeout 100m: ok (gateway 2742s at load ~25).
- The commit below this one ran go test ./... -timeout 100m: 68
packages ok; this one touches internal/redact and its doc only.