Menu

Typing untrusted text into a terminal from Swift: bracketed paste, control characters, and why "\r\n" is one Character

#swift#redditswift#paste#value#line
Reading 0:00
15s threshold

I'm building a macOS app that types text into a terminal on the user's behalf: saved prompts, code snippets from a diff, branch names, clipboard text. By default nothing is submitted (there's an opt-in auto-send), so I assumed that was safe. It isn't.…

Anonymous readers can preview up to 1024 characters here. Log in to unlock the full article once ingest succeeds.