fix(coord-send): stop rejecting dot-prefixed repo names
coord-send.sh:154 guarded the --to target with a `.*` case arm, which rejects every leading-dot name instead of just `.` and `..`. A dot-prefixed name is a real repo identity (basename of a git toplevel under a hidden directory, e.g. ~/.claude) and was reported unreachable by morning-driver via coord message 20260809T103138Z. Narrowed the guard to reject exactly `.` and `..`, matching the equivalent guards already used elsewhere in this file and in coord-done.sh. coord-count.sh and coord-sweep.sh both enumerate the mailbox root with a bare "$COORD"/* glob, which by construction never matches a dot-prefixed directory - confirmed empirically before this change. Fixing only the send-side guard would have let a dot-prefixed mailbox receive mail that neither script could ever report or close on its grace window. Both now also glob "$COORD"/.[!.]* to reach hidden mailboxes without matching "." or "..". coord-selftest.sh: 183 -> 191 checks, section 30 covers the fix and both enumeration paths. Doc counts (README badge, CLAUDE.md) updated to match; the catalog's mirrored badge is untouched pending release. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CHmf1VfCvaYXamJxe5y6Vt
This commit is contained in:
parent
ddc978d4c1
commit
f425a11311
6 changed files with 57 additions and 8 deletions
|
|
@ -150,8 +150,11 @@ fi
|
|||
if [ "$BROADCAST" -eq 0 ]; then
|
||||
# _* rather than the single literal _broadcast: the reserved namespace is a
|
||||
# rule, so a future internal directory is covered the day it is added.
|
||||
# Exact . and .. only, not a `.*` prefix match: a dot-prefixed name is a real
|
||||
# repo (basename of a git toplevel under a hidden directory, e.g. ~/.claude),
|
||||
# and the guard's job is to stop path traversal, not every hidden name.
|
||||
case "$TO" in
|
||||
*/*|.*|_*) echo "coord-send: invalid target repo name: $TO" >&2; exit 2 ;;
|
||||
*/*|.|..|_*) echo "coord-send: invalid target repo name: $TO" >&2; exit 2 ;;
|
||||
esac
|
||||
fi
|
||||
if [ -z "$SUBJECT" ]; then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue