Commit graph

17690 commits

Author SHA1 Message Date
Kovid Goyal
9c8a4ad540
... 2026-04-04 11:47:08 +05:30
Kovid Goyal
8bf1bd479b
edit-in-kitty: Ignore environment variables as some editors execute code present in env vars 2026-04-04 08:42:06 +05:30
Kovid Goyal
4aa7739bdd
... 2026-04-03 23:26:39 +05:30
Kovid Goyal
0fcbd265b6
Accumulate DnD image data 2026-04-03 23:18:07 +05:30
Kovid Goyal
950497ac0c
Cleanup previous PR 2026-04-03 22:25:05 +05:30
Kovid Goyal
d8f2d703d7
Merge branch 'security-hardening' of https://github.com/z3rco/kitty 2026-04-03 21:24:26 +05:30
Kovid Goyal
281cff0b60
base64 decode present dnd source data 2026-04-03 21:13:41 +05:30
z3rco
b39f88c6a2 Fix multiple security vulnerabilities across C, Python, and Go code
Timing-safe comparisons:
- crypto.c: Replace memcmp with CRYPTO_memcmp for Secret equality,
  require equal lengths before comparing
- remote_control.py: Constant-time password lookup to avoid leaking
  valid passwords via dict hash timing
- file_transmission.py: Use hmac.compare_digest for bypass token
  comparison instead of ==

Memory safety:
- child-monitor.c: Fix inverted condition in write_to_peer that
  prevented memmove from ever executing on partial writes
- ibus_glfw.c: Null-terminate IBUS_ADDRESS copy to prevent string
  overread when strlen >= PATH_MAX
- x11_window.c: Add NULL checks after realloc in clipboard/DnD
  data handling (two sites)
- dnd.c: Cap accepted_mimes at 1MB to prevent unbounded growth,
  fix realloc to not lose the original pointer on failure
- png-reader.c: Cast to size_t before multiplication to prevent
  integer overflow on 32-bit platforms

Secrets hygiene:
- disk-cache.c: Zero encryption_key with explicit_bzero before free

Tar extraction hardening:
- tar.go: Validate hardlink targets against destination prefix to
  prevent writing outside extraction directory
- tar.go: Strip setuid/setgid/sticky bits from extracted files

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 16:10:46 +01:00
Kovid Goyal
0619c7e435
More work on DnD protocol 2026-04-03 19:58:59 +05:30
Kovid Goyal
6cc9bd69c0
icat: Fix incorrect colors when displaying some images with an ICC profile that produces out of gamut colors 2026-04-03 19:57:43 +05:30
Kovid Goyal
d592468375
... 2026-04-03 14:04:50 +05:30
Kovid Goyal
e09bfc0708
Update changelog 2026-04-03 13:53:26 +05:30
Kovid Goyal
c246da81cc
Merge branch 'copilot/implement-todo-line-89' of https://github.com/kovidgoyal/kitty 2026-04-03 11:58:58 +05:30
copilot-swe-agent[bot]
0f4b673d02
Implement TODO in drag_add_mimes: populate ds.mimes from ds.mimes_buf
Agent-Logs-Url: https://github.com/kovidgoyal/kitty/sessions/b92ba12a-26f2-4a01-8ad9-665bbd90b98a

Co-authored-by: kovidgoyal <1308621+kovidgoyal@users.noreply.github.com>
2026-04-03 06:23:58 +00:00
Kovid Goyal
f6339d0bbf
More work on the DnD protocol 2026-04-03 11:42:22 +05:30
Kovid Goyal
06d201c3a5
... 2026-04-03 09:55:36 +05:30
Kovid Goyal
0584cbfadc
Implement sending drag start message to client 2026-04-03 09:42:57 +05:30
Kovid Goyal
cf52a8289c
... 2026-04-03 08:31:42 +05:30
Kovid Goyal
c1947765f3
Fix #9799 2026-04-03 08:21:45 +05:30
Kovid Goyal
07f4d3c7ae
Unify the two drag threshold settings 2026-04-02 13:49:15 +05:30
Kovid Goyal
d1d7a442b6
Merge branch 'copilot/modify-glfwstartdrag-cancel' of https://github.com/kovidgoyal/kitty 2026-04-02 12:47:55 +05:30
copilot-swe-agent[bot]
2f33460864
Add operations==-3 cancel drag support to glfwStartDrag
Agent-Logs-Url: https://github.com/kovidgoyal/kitty/sessions/eff7e2c8-ab7a-4967-95b5-e65631245701

Co-authored-by: kovidgoyal <1308621+kovidgoyal@users.noreply.github.com>
2026-04-02 07:14:36 +00:00
Kovid Goyal
e41592e3b1
More work on the DnD protocol 2026-04-02 12:03:49 +05:30
Kovid Goyal
04665db6dd
Merge branch 'copilot/improve-dnd-file-reading-non-blocking' of https://github.com/kovidgoyal/kitty 2026-04-02 11:46:22 +05:30
copilot-swe-agent[bot]
e948f64dbf
dnd.c: use non-blocking I/O in drop_send_file_chunks()
Agent-Logs-Url: https://github.com/kovidgoyal/kitty/sessions/472b29a5-22c7-4f25-9541-9c9fafa78518

Co-authored-by: kovidgoyal <1308621+kovidgoyal@users.noreply.github.com>
2026-04-02 06:13:23 +00:00
Kovid Goyal
5cb0df0305
Update changelog 2026-04-02 08:55:45 +05:30
Kovid Goyal
af355e78d3
Merge branch 'copilot/improve-file-url-parsing' of https://github.com/kovidgoyal/kitty 2026-04-02 08:55:06 +05:30
copilot-swe-agent[bot]
087c5c1db9
dnd.c: strip query and fragment parts from file:// URLs before path resolution
Agent-Logs-Url: https://github.com/kovidgoyal/kitty/sessions/8293fefc-4d7c-4502-9646-6270328d4a59

Co-authored-by: kovidgoyal <1308621+kovidgoyal@users.noreply.github.com>
2026-04-02 03:19:41 +00:00
Kovid Goyal
4688992d57
... 2026-04-02 08:45:09 +05:30
Kovid Goyal
eff590ab5a
Merge branch 'copilot/improve-memory-management' of https://github.com/kovidgoyal/kitty 2026-04-01 21:13:38 +05:30
copilot-swe-agent[bot]
c5afef1142
Rename file_fd to file_fd_plus_one so zero value means invalid fd
Agent-Logs-Url: https://github.com/kovidgoyal/kitty/sessions/e5f07308-d11d-43d9-9dd5-75b3a10c6e2e

Co-authored-by: kovidgoyal <1308621+kovidgoyal@users.noreply.github.com>
2026-04-01 15:29:12 +00:00
copilot-swe-agent[bot]
68cb5760b3
dnd.c: send file data in chunks instead of reading entire file into memory
Agent-Logs-Url: https://github.com/kovidgoyal/kitty/sessions/5ec2905d-2e8a-4b6a-8070-cd59921cd61d

Co-authored-by: kovidgoyal <1308621+kovidgoyal@users.noreply.github.com>
2026-04-01 15:06:06 +00:00
Kovid Goyal
15e37efd00
Fix fd leak on invalid file 2026-04-01 20:16:49 +05:30
Kovid Goyal
03cf6f9348
Fix unclosed resource warning in test 2026-04-01 20:01:28 +05:30
Kovid Goyal
1fbb10e789
Use fstat() rather than stat() 2026-04-01 19:58:04 +05:30
Kovid Goyal
78f1607bf5
Cleanup previous PR 2026-04-01 19:52:40 +05:30
Kovid Goyal
05f4c324f1
Merge branch 'copilot/implement-dnd-protocol-dropping-remote' of https://github.com/kovidgoyal/kitty 2026-04-01 19:37:17 +05:30
copilot-swe-agent[bot]
51fe3dc274
Implement DnD protocol: t=s URI file transfer and t=d directory listing with tests
Agent-Logs-Url: https://github.com/kovidgoyal/kitty/sessions/a5aee38b-1746-4699-9dcc-2138f43cabe8

Co-authored-by: kovidgoyal <1308621+kovidgoyal@users.noreply.github.com>
2026-04-01 08:55:55 +00:00
Kovid Goyal
81d0e2dc8e
Cleanup previous PR 2026-04-01 13:05:56 +05:30
Kovid Goyal
9d5f7b085c
Merge branch 'copilot/add-testing-framework-for-dnd-protocol' of https://github.com/kovidgoyal/kitty 2026-04-01 13:04:40 +05:30
copilot-swe-agent[bot]
02aec3fa3e
Add DnD protocol test framework and tests
Agent-Logs-Url: https://github.com/kovidgoyal/kitty/sessions/faa69cb9-991d-49f4-802b-263f4bb28ee9

Co-authored-by: kovidgoyal <1308621+kovidgoyal@users.noreply.github.com>
2026-04-01 07:22:47 +00:00
Kovid Goyal
4f7855aede
More work on the DnD protocol 2026-04-01 12:01:04 +05:30
Kovid Goyal
3ee440b004
Merge branch 'copilot/fix-divider-drag-issues-again' of https://github.com/kovidgoyal/kitty 2026-04-01 09:26:35 +05:30
copilot-swe-agent[bot]
96d10e51a0
Fix drag resize direction bugs and add comprehensive tests
Agent-Logs-Url: https://github.com/kovidgoyal/kitty/sessions/12198e55-3901-439b-9fba-9b5f5b470416

Co-authored-by: kovidgoyal <1308621+kovidgoyal@users.noreply.github.com>
2026-04-01 03:48:49 +00:00
Kovid Goyal
82df574539
Merge branch 'copilot/improve-password-input-visuals' of https://github.com/kovidgoyal/kitty 2026-04-01 08:25:52 +05:30
copilot-swe-agent[bot]
1853c48561
tui/password: make lock emoji blink at 500ms via repeating timer
Agent-Logs-Url: https://github.com/kovidgoyal/kitty/sessions/3ee6840f-29cc-43bb-a4b6-bf9ae604ea11

Co-authored-by: kovidgoyal <1308621+kovidgoyal@users.noreply.github.com>
2026-04-01 02:51:40 +00:00
copilot-swe-agent[bot]
8aa83221e8
Improve password input: hide cursor and show lock emoji (U+1F512)
Agent-Logs-Url: https://github.com/kovidgoyal/kitty/sessions/cf06c199-5837-41da-bebf-eb3c220684db

Co-authored-by: kovidgoyal <1308621+kovidgoyal@users.noreply.github.com>
2026-04-01 02:43:55 +00:00
Kovid Goyal
897a2f4126
Merge branch 'copilot/fix-mypy-errors' of https://github.com/kovidgoyal/kitty 2026-03-31 23:33:07 +05:30
copilot-swe-agent[bot]
6c354159a8
fix mypy errors in search_query_parser.py and actions.py
Agent-Logs-Url: https://github.com/kovidgoyal/kitty/sessions/5d37ece0-388b-4c99-a1bc-3b2c3bed34e6

Co-authored-by: kovidgoyal <1308621+kovidgoyal@users.noreply.github.com>
2026-03-31 17:57:12 +00:00
Kovid Goyal
50ac569aad
Add new set_progress() method to Screen declaration 2026-03-31 23:01:24 +05:30