Commit 272a8ee
committed
refactor: deduplicate terminal sanitizer in read.rs
Replace the local sanitize_terminal_output function with the existing
crate::error::sanitize_for_terminal via import alias. This eliminates
code duplication and provides consistent sanitization across the codebase.
The crate-wide sanitizer also correctly strips CR (carriage return) which
can be abused for terminal overwrite attacks.1 parent 24561a7 commit 272a8ee
1 file changed
+5
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
| 105 | + | |
| 106 | + | |
113 | 107 | | |
114 | 108 | | |
115 | 109 | | |
| |||
122 | 116 | | |
123 | 117 | | |
124 | 118 | | |
125 | | - | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
126 | 122 | | |
127 | 123 | | |
128 | | - | |
129 | 124 | | |
130 | 125 | | |
131 | 126 | | |
| |||
0 commit comments