Add support for DECRQCRA #19512

Open
opened 2026-01-31 06:45:32 +00:00 by claunia · 0 comments
Owner

Originally created by @j4james on GitHub (Mar 9, 2023).

Description of the new feature/enhancement

DECRQCRA is an escape sequence which lets you request a checksum of a portion of the screen, and that gives you a way to read back the buffer contents. This is useful for creating automated tests that can be run on the original DEC terminals and then easily compared against our own implementation to verify that we're doing things correctly (for an example of that, see #14876).

Proposed technical implementation details (optional)

The problem with this functionality is that some people consider it a security risk. Looking at the other terminals that support this, most do seem to have it enabled by default, but some have it behind an option, and some require you to build the app yourself with a specific define enabled.

VTE and Konsole are the ones I know of that require a build-time option, XTerm and iTerm2 have a runtime option, and MLTerm, Mintty, WezTerm, RLogin, SyncTerm, and Reflection all have it enabled by default (I think - I can't rule out some of them having an option that I've forgotten about turning on).

So if we do want to support this, how do you want to handle it? I could live with a compile time option - that's at least better than merging from a stash (which is what I'm doing at the moment). A step up from that would be enabling from a registry entry - it would only apply in conhost, but that is fine for testing. My personal preference, though, would be to have it enabled all the time, but I can understand if that's not acceptable.

Originally created by @j4james on GitHub (Mar 9, 2023). # Description of the new feature/enhancement [`DECRQCRA`](https://vt100.net/docs/vt510-rm/DECRQCRA.html) is an escape sequence which lets you request a checksum of a portion of the screen, and that gives you a way to read back the buffer contents. This is useful for creating automated tests that can be run on the original DEC terminals and then easily compared against our own implementation to verify that we're doing things correctly (for an example of that, see #14876). # Proposed technical implementation details (optional) The problem with this functionality is that some people consider it a security risk. Looking at the other terminals that support this, most do seem to have it enabled by default, but some have it behind an option, and some require you to build the app yourself with a specific `define` enabled. VTE and Konsole are the ones I know of that require a build-time option, XTerm and iTerm2 have a runtime option, and MLTerm, Mintty, WezTerm, RLogin, SyncTerm, and Reflection all have it enabled by default (I think - I can't rule out some of them having an option that I've forgotten about turning on). So if we do want to support this, how do you want to handle it? I could live with a compile time option - that's at least better than merging from a stash (which is what I'm doing at the moment). A step up from that would be enabling from a registry entry - it would only apply in conhost, but that is fine for testing. My personal preference, though, would be to have it enabled all the time, but I can understand if that's not acceptable.
claunia added the Help WantedIssue-TaskIn-PRArea-VTNeeds-Tag-FixProduct-Terminal labels 2026-01-31 06:45:33 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#19512