Skip to content

Issue 169: With Wireshark 4.6.0, the column-title glossary changed#170

Open
gilramir wants to merge 1 commit into
gcla:masterfrom
gilramir:issue-169_columnformat_test
Open

Issue 169: With Wireshark 4.6.0, the column-title glossary changed#170
gilramir wants to merge 1 commit into
gcla:masterfrom
gilramir:issue-169_columnformat_test

Conversation

@gilramir

Copy link
Copy Markdown

A third column is now possible, so the column-format initializer needs to handle it. Also, since the output is a simple tab-separated-value format, we don't need regular expressions to parse it. We only need to split on tab characters.

A third column is now possible, so the column-format initializer
needs to handle it. Also, since the output is a simple
tab-separated-value format, we don't need regular expressions to
parse it. We only need to split on tab characters.
cmingou added a commit to cmingou/termshark that referenced this pull request Apr 28, 2026
Two related fixes for Wireshark >= 4.6.0 compatibility:

* Wireshark 4.6 changed tshark -G column-formats to emit a third,
  tab-separated field holding the display filter name (e.g.
  "%At\tAbsolute time\t_ws.col.abs_time"). The old parser split on
  \s+ with a max of 2 pieces, so the second field contained the
  tab and the filter name. TestCF1 failed, and the long name stored
  in AllowedColumnFormats carried an embedded tab plus heavy padding.
  Split strictly on \t and accept both the 2-column layout used by
  <= 4.4 and the 3-column layout used by >= 4.6.

* When a user already had a cached tsharkcolumnsv2.gob.gz generated
  against a 4.6+ tshark, those malformed names were persisted. Opening
  "Edit Columns" then rendered a button label containing a tab, which
  overflowed the fixed-width cell and panicked inside
  gowid/widgets/text ("index out of range"). Bump the cache filename to
  tsharkcolumnsv3.gob.gz so existing broken caches are regenerated, and
  add sanitizeColumnName() to strip control characters both on the
  first load and when re-reading user-configured names from the toml
  profile, so any residual bad data is still rendered safely.

Fixes gcla#169.
Fixes gcla#171.

Based on the approach from PR gcla#170 by Gilbert Ramirez.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant