Repository navigation
Conversation
1. Root cause: inputMethodEvent received commitString/preeditString from input methods without filtering NUL bytes (\x00), which were written into the document via insertSelectTextEx and persisted to file on save 2. Fix: remove NUL bytes from the text string before passing it to insertSelectTextEx, and skip insertion entirely if text becomes empty after removal 3. Impact: only affects text containing NUL bytes (e.g. from Sogou soft keyboard); normal text input is unaffected Influence: 1. Test input method commit with normal text to verify no regression 2. Test input method commit with NUL-containing text to verify NUL bytes are filtered 3. Test file save and reopen after NUL-containing input to verify no invalid character NULL warning fix: 过滤输入法事件中的 NUL 字节 1. 根因:inputMethodEvent 接收输入法的 commitString/preeditString 时未过滤 NUL 字节(\x00),NUL 字节经 insertSelectTextEx 写入文档 并在保存时持久化到文件 2. 方案:在传入 insertSelectTextEx 之前移除 NUL 字节,移除后若文本 为空则跳过插入 3. 影响:仅影响含 NUL 字节的文本(如搜狗软键盘输入),正常文本输入 不受影响 Influence: 1. 测试输入法正常输入文字(中文、英文、数字),验证无回归 2. 测试输入法提交含 NUL 字节的文本,验证 NUL 字节被过滤 3. 测试含 NUL 输入后保存并重新打开文件,验证不再提示无效字符NULL PMS: BUG-372753
|
Skipping CI for Draft Pull Request. |
Reviewer's GuideImplementationFilter NUL characters from preedit or committed input-method text and skip insertion when nothing remains.
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: pengfeixx The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
TAG Bot New tag: 6.6.10 |
|
TAG Bot New tag: 6.6.11 |
|
TAG Bot New tag: 6.6.12 |
fix: filter NUL bytes from input method events
from input methods without filtering NUL bytes (\x00), which were
written into the document via insertSelectTextEx and persisted to
file on save
insertSelectTextEx, and skip insertion entirely if text becomes
empty after removal
soft keyboard); normal text input is unaffected
Influence:
bytes are filtered
no invalid character NULL warning
fix: 过滤输入法事件中的 NUL 字节
时未过滤 NUL 字节(\x00),NUL 字节经 insertSelectTextEx 写入文档
并在保存时持久化到文件
为空则跳过插入
不受影响
Influence:
PMS: BUG-372753
Summary by Sourcery
Bug Fixes: