Commit 7a1ebc1
fix: validate previewUrl in ImageToDataUrl
Addresses CodeQL alert for "DOM text reinterpreted as HTML" by ensuring the `src` attribute of the preview image strictly starts with `blob:`. This prevents potential XSS if `previewUrl` were somehow tainted with a `javascript:` URL.
Also removed the `title` attribute from the file name display to reduce surface area for attribute injection concerns, although React escapes it.
Co-authored-by: sabeerbikba <59386700+sabeerbikba@users.noreply.github.com>1 parent 1df6d8e commit 7a1ebc1
1 file changed
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
| 117 | + | |
| 118 | + | |
117 | 119 | | |
118 | 120 | | |
119 | 121 | | |
| |||
144 | 146 | | |
145 | 147 | | |
146 | 148 | | |
147 | | - | |
| 149 | + | |
148 | 150 | | |
149 | 151 | | |
150 | 152 | | |
| |||
0 commit comments