Conversation
Currently validating function checks stripped value for correctness but then just discards it. Let's use a stripped value to avoid stray characters. Also removed reference to a ticket that is no longer relevant in the context. fixes QubesOS/qubes-issues#11116
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #887 +/- ##
==========================================
+ Coverage 70.42% 70.75% +0.33%
==========================================
Files 61 61
Lines 14128 14360 +232
==========================================
+ Hits 9950 10161 +211
- Misses 4178 4199 +21
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
ben-grande
left a comment
There was a problem hiding this comment.
I see now, on the issue, I did the debugging steps on R4.3 instead of R4.4, cause I thought you were at that version.
I don't think the validation should be responsible for providing the value in most cases, but on this specific function, it is sanitization (decode to ASCII) plus validation, so I think it is fine.
|
|
||
|
|
||
| def validate_label_value(untrusted_label_value) -> None: | ||
| def validate_label_value(untrusted_label_value) -> str: |
There was a problem hiding this comment.
Maybe there shouldn't be a .strip() below, other checks below would detect that \n is not hexdigit, and the length would not match also.
There was a problem hiding this comment.
And please provide a test for a color value ending with a newline char.
Currently validating function checks stripped value for correctness but then just discards it. Let's use a stripped value to avoid stray characters.
Also removed reference to a ticket that is no longer relevant in the context.
content notice: debugging was assisted by qwen 3.8 large language model; no code in this PR was generated by an llm
fixes QubesOS/qubes-issues#11116