mirror of
https://github.com/dikeckaan/mu300-linux.git
synced 2026-12-06 00:03:00 +00:00
The webhook sent one of two fixed bodies (JSON or a form with sender,
time, text, device, message), which Lark/Feishu, DingTalk, WeCom, Slack,
Discord, Bark or ntfy do not accept.
- webhook_body: a template with {sender} {time} {text} {device}
{message}. The type (json, form, and now text) is the Content-Type and
decides how each value is written: the inside of a JSON string,
percent-encoded, or as it is. An empty body is the standard one,
unchanged; for text that is the message alone.
- mu300-sms-forward: one awk function (fill) for the message template
and the body. Template and values reach awk in its environment and
are only copied: no shell, no eval, no awk -v, one pass. A filled-in
body over 64 KiB is refused and not retried.
- unisoc-modem/forward: 2000 bytes, no control character but newline and
tab. The body comes back to the page (a template, not a secret); the
address and the headers still never do.
- esc_tpl: backslashes doubled by hand. With busybox awk the gsub
replacement wrote one backslash, so a template's \n or \" was stored
bare and read back as an escape (also true of the message template
before this).
- forward.js: the "Plain text" type and the "Custom body" field; four
messages in all 31 catalogs.
Tests: tests/test_sms_forward.py (hostile sender and text through each
type, the standard body unchanged, Send test, the size limit, the
adapter round trip through the forwarder, refusals), also run under
busybox ash with busybox as awk. FINDINGS 54, README, wiki/SMS.md.
Not in this change: reading a service's own error out of an HTTP 200
answer, and a button to clear the delivery log.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VVN2zDgf76kMDVSuWhHPUE