Flash JSON serialization emits unescaped control characters
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 76/100
Research direction
Read src/sys/session/flash.c:136-149, where cwist_flash_pop_all_json() escapes flash keys and values. Add tests for control characters in both keys and values, then validate the output with a strict JSON parser. Done means the output uses valid JSON escaping for all U+0000 through U+001F characters.
Written by the indexing model from the issue text.
Description
Affected: dev at bb2a33946.
cwist_flash_pop_all_json() escapes only quotes and backslashes in keys and values (src/sys/session/flash.c:136-149). Newlines, tabs, and other U+0000 through U+001F bytes are emitted literally, which violates JSON string rules in RFC 8259.
For example, a flash value first\nsecond produces a string containing a literal newline rather than \n. Strict JSON consumers reject the result.
Expected: use cJSON serialization or implement complete JSON escaping, including short escapes and \u00XX for remaining control bytes. Add tests for control characters in both keys and values and validate with a strict parser.
- Dominant language
- C
- Stars
- 16
- Forks
- 7
- Avg merge
- 5h 39m
- Merged PRs (30d)
- 185
Getting set up
- No Dockerfile or Docker Compose file
- No 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 c4punks/CWIST
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
bug
Difficulty 4/5 1-2 days Newbie friendliness 57/100
Maintainers usually reply within 1 day
-
bug good first issue
Difficulty 4/5 3-5 days Newbie friendliness 52/100
Maintainers usually reply within 1 day
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 65/100
Maintainers usually reply within 1 day
Similar issues
-
5700模组网络优先级问题Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
severity: low
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
luainkernel/lunatik#2372 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 75/100
ly05010419/MacNativeGames#1796 ·
Maintainers usually reply within 1 day
-
ZSTD_decompressStream accepts a Compressed_Block with Block_Size 0 that ZSTD_decompress rejectsOpen
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
jniebuhr/gaggimate#1009 · 1 comment ·
Maintainers usually reply within 1 day