Commit 5a94aac
committed
fix: replace HTMLParser template rendering with regex substitution
HTMLParser treats <TITLE> and other raw text elements as opaque —
child tags like <condata> inside <TITLE> are passed to handle_data()
as raw text rather than being parsed as tags. This caused template
variables to leak into HTTP responses verbatim, allowing trivial
honeypot fingerprinting.
Replace substitute_template_fields() with a regex-based approach that
scans the full payload for <condata source='...' key='...' /> patterns
regardless of surrounding HTML context.
Before: <TITLE>Overview - <condata source="databus" key="SystemDescription" /></TITLE>
After: <TITLE>Overview - Siemens, SIMATIC, S7-200</TITLE>
Fixes #11 parent 263f145 commit 5a94aac
1 file changed
Lines changed: 21 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| |||
177 | 178 | | |
178 | 179 | | |
179 | 180 | | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
188 | 201 | | |
189 | 202 | | |
190 | 203 | | |
| |||
0 commit comments