bug(gmail): `+read` silently loses body content — prefers empty text/plain part, truncates, drops anchor hrefs
Maintainers usually reply within 1 day
Nobody has claimed this yet.
- #897 by @jokrasno — closed without merging
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 55/100
Research direction
Start with the gws gmail +read entry point in version 0.22.5 and reproduce the three reported cases: multipart/alternative mail, the 3,209-byte draft, and HTML containing anchor links. Compare the decoded output with the source bodies, then verify that richer content, href targets, entities, line breaks, and any truncation marker are preserved.
Written by the indexing model from the issue text.
Description
gws gmail +read returns incomplete message bodies with no indication that content was dropped. Three distinct failures, all silent:
1. Prefers a stub text/plain part over a rich text/html part. On a real multipart/alternative message, the text part was 59 chars with zero URLs; the HTML part was 17,590 chars containing 6 links. +read returned the 59-char stub, discarding the entire message.
2. Truncates. A 3,209-byte draft came back as 198 bytes, cut mid-word. No [truncated] marker.
3. Drops anchor targets. HTML→text conversion discards href values, so any message whose payload is a link — invitations, password resets, portal access, OTP magic links — is unreadable. One invitation rendered as invisible word-joiner characters with no URL at all.
Also: HTML entities aren't unescaped (' appears literally) and block elements don't produce line breaks, so multi-paragraph bodies collapse to one line.
Impact: consumers can't tell content was lost. Worse for drafts — a correct outbound draft looks mangled, and the natural response is to delete and rebuild it.
Suggested: emit the full decoded body, select the richer alternative part when text/plain is empty or substantially shorter, preserve href targets (inline or as a link list), unescape entities, and if any cap is retained, print an explicit [truncated N bytes] marker.
Version: 0.22.5
- Dominant language
- Rust
- Stars
- 32.3k
- Forks
- 2k
- Avg merge
- 16h 3m
- Merged PRs (30d)
- 1
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from googleworkspace/cli
-
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
googleworkspace/cli#984 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
googleworkspace/cli#983 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 82/100
googleworkspace/cli#958 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
googleworkspace/cli#921 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
googleworkspace/cli#920 ·
Maintainers usually reply within 1 day
All issues in googleworkspace/cli
Similar issues
-
area:cli area:security bug priority:medium
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
status: new topic: ga4gh-sdk type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
comp-rbac
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
ClickHouse/ClickHouse#131875 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Maintainers usually reply within 1 day
-
bug(python): read_transaction raises TypeError on a Rewrite with rewritten indicesPossibly taken @Borg93 claimed this today. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
lance-format/lance#11117 ·
Maintainers usually reply within 2 days