Commit a9e4f1e
committed
fix: address CodeQL security vulnerabilities in URL handling
- Validate and sanitize URLs before loading in iframe
- Use URL constructor to parse and validate URLs
- Only allow HTTP and HTTPS protocols
- Use setAttribute instead of direct property assignment
- Add proper error handling for invalid URLs
This fixes:
- Client-side URL redirect vulnerability
- DOM text reinterpreted as HTML
- Client-side cross-site scripting (XSS)1 parent e6b80cc commit a9e4f1e
1 file changed
+25
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
| 116 | + | |
121 | 117 | | |
122 | | - | |
123 | | - | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
124 | 140 | | |
125 | 141 | | |
126 | 142 | | |
127 | 143 | | |
128 | | - | |
| 144 | + | |
129 | 145 | | |
130 | 146 | | |
131 | 147 | | |
| |||
137 | 153 | | |
138 | 154 | | |
139 | 155 | | |
140 | | - | |
| 156 | + | |
141 | 157 | | |
142 | 158 | | |
143 | 159 | | |
| |||
0 commit comments