Issue 169: With Wireshark 4.6.0, the column-title glossary changed#170
Open
gilramir wants to merge 1 commit into
Open
Issue 169: With Wireshark 4.6.0, the column-title glossary changed#170gilramir wants to merge 1 commit into
gilramir wants to merge 1 commit into
Conversation
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.
3 tasks
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.