bug: .taskrc parser silently truncates values containing '=' characters causing silent authentication failures
評估
- 難度
- 2/5
- 預估耗時
- 1-3 小時
- 新手友好度
- 55/100
- Issue 類型
- 缺陷
- 描述清晰度
- 描述清楚
- 活躍度
- 停滯
研究方向
閱讀 lib/app/utils/taskserver/parse_taskrc.dart,重點查看第 7-8 行的解析器,然後透過使用包含 '=' 的值設定 TaskServer 來重現問題。當解析後的值保留第一個分隔符之後的所有內容(包括 base64 填充),同時依照描述跳過格式錯誤的行時,工作即告完成。
由索引模型根據 Issue 內容生成。
描述
Describe your issue
The .taskrc parser in lib/app/utils/taskserver/parse_taskrc.dart
uses line.split('=') to parse key-value pairs. This causes silent
data truncation for any parameter whose value contains one or more =
characters.
This is a critical bug because base64-encoded certificates and other
taskd parameter values routinely contain = padding characters. When
these values are truncated, authentication silently fails with
absolutely no error shown to the user — making it nearly impossible
to diagnose.
Root Cause:
File: lib/app/utils/taskserver/parse_taskrc.dart
Line: 7-8
The parser does:
.map((line) => line.split('='))
and then blindly extracts pair[0] and pair[1]. When a value contains
= (e.g. base64 padding), split('=') produces 3+ parts — everything
from pair[2] onwards is permanently dropped.
Example:
Input: taskd.certificate=abc123==
split result: ['taskd.certificate', 'abc123', '', '']
Stored: 'abc123' ← trailing == silently lost
Steps to reproduce
-
Create a .taskrc file containing any parameter whose value includes
one or more '=' characters, for example:taskd.certificate=LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0t== -
Import this .taskrc into the app during TaskServer configuration setup
-
Tap "Taskrc file is verified" to inspect the parsed configuration
-
Observe: everything after the second '=' in the value is silently
dropped from the stored configuration
What was the expected result?
The parser should split only on the first occurrence of '=' and
preserve the entire remainder of the line as the value.
The correct fix is to replace line.split('=') with a first-occurrence
split:
final index = line.indexOf('=');
if (index == -1) return; // skip malformed lines
final key = line.substring(0, index).trim();
final value = line.substring(index + 1).trim();
This correctly handles all values containing '=' characters including
base64-encoded certificates, credentials, and taskd.trust parameters.
Impact:
- Any user with base64-encoded certificates in their .taskrc is
silently affected - Directly contributes to the root cause of issue #428 (taskd.trust
being ignored) since cert fields with '=' padding are dropped before
reaching the SSL handshake - Authentication silently fails with no error surfaced to the user
- Affects all platforms: Android, Linux, Windows, macOS
Put here any screenshots or videos (optional)
N/A — this is a code-level parser bug reproducible by reading
lib/app/utils/taskserver/parse_taskrc.dart lines 7-8
How can we contact you (optional)
Available on CCExtractor Zulip: Varad Raj Agrawal
Would you like to work on this issue?
Yes
By submitting this issue, I have confirmed that:
- I have starred the repo ⭐ and watched 👀 it on GitHub and followed the contribution guidelines.
- 主要語言
- Dart
- 星號
- 246
- 分支
- 184
- PR 合併指標
- 30 天內沒有已合併 PR
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
CCExtractor/taskwarrior-flutter 的其他 Issue
-
Fix misaligned text "Select the directory" in settings tile可能重新可做 @alabeddev 於 241 天前認領,目前沒有進行中的 PR。 未關閉bug
難度 2/5 1-3 小時 新手友好度 68/100
CCExtractor/taskwarrior-flutter#639 · 2 則留言 ·
-
bug
難度 1/5 1 小時以內 新手友好度 85/100
-
Drawer should close automatically when navigating to a new screen可能重新可做 關聯的 PR 已關閉且未合併。 未關閉bug
難度 2/5 1-3 小時 新手友好度 68/100
-
enhancement
難度 4/5 3-5 天 新手友好度 52/100
-
Sensitive Credentials Stored in Plain Text Files Without Encryption可能重新可做 @sahu-virendra-1908 於 238 天前認領,目前沒有進行中的 PR。 未關閉bug
難度 5/5 一週以上 新手友好度 45/100
CCExtractor/taskwarrior-flutter#645 · 1 則留言 ·
查看 CCExtractor/taskwarrior-flutter 的全部 Issue
相似的 Issue
-
難度 1/5 1 小時以內 新手友好度 60/100
hiddify/hiddify-app#2668 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 65/100
toyota-connected/emb_cli#358 ·
維護者通常 1 天內回覆
-
area: import beta cluster: callers box improvements severity: minor status: confirmed type: bug
難度 2/5 1-3 小時 新手友好度 62/100
ibanner56/CallersCompendium#2366 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 72/100
ccch1mneyyy/dsh-Go#1777 ·
維護者通常 1 天內回覆
-
area: mobile documentation good first issue
難度 2/5 1-3 小時 新手友好度 76/100
CommandLineCoding/Elephant#383 ·
維護者通常 1 天內回覆