diff options
| author | Gabriel Schneider <[email protected]> | 2026-09-29 09:11:37 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-10-01 00:12:16 -0300 |
| commit | a550753fb60be3cdc040c521ddaab9022f5d3248 (patch) | |
| tree | 9d392076f417b6a9d53b6a1bc9ce7fe44d4e499b /src/ninep/cols.zig | |
| parent | 4d4818f7baf356866d323e4b337a64a3dddd8adb (diff) | |
| download | pardes-a550753fb60be3cdc040c521ddaab9022f5d3248.tar.gz pardes-a550753fb60be3cdc040c521ddaab9022f5d3248.zip | |
Every EINVAL a write gets says why; DEL in an exec or look line is a control character
An empty name, a word written to log other than follow, a data, sel, dot
or dirty write to a pane with no text, a truncate other than to zero,
and a control character in a look line written through a held open were
refused with no words, logged as `Invalid argument`. Each says its reason
now; and DEL is refused in exec and look lines as in names.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src/ninep/cols.zig')
| -rw-r--r-- | src/ninep/cols.zig | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ninep/cols.zig b/src/ninep/cols.zig index 7f78522a..6fdcda07 100644 --- a/src/ninep/cols.zig +++ b/src/ninep/cols.zig @@ -166,7 +166,7 @@ pub fn writeExec(p: *Pardes, req: Req, serial: ?u32) Reply { while (lines.next()) |raw| { const line = std.mem.trim(u8, raw, " \t\r"); if (line.len == 0) continue; - for (line) |c| if (c < ' ' and c != '\t') return tree.failText(req.tag, E.INVAL, pardes.ctlfs.ctl.e_control); + for (line) |c| if ((c < ' ' and c != '\t') or c == 0x7f) return tree.failText(req.tag, E.INVAL, pardes.ctlfs.ctl.e_control); if (pardes.ctlfs.ctl.tooLong(req, line)) |refusal| return refusal; // A pane's word (Undo, Msg, Save) is no word of a tag no pane owns: // refused as the root's ctl refuses it, never done at whichever |
