@@ -178,18 +178,39 @@ function updateCVE(cve) {
178
178
}
179
179
}
180
180
181
- function CVE_2011_4969 ( ) {
182
- error ( 'TODO' ) ;
181
+ function CVE_2011_4969 ( cve ) {
182
+
183
+ location . hash = `<img src="x" onerror="triggerCVE('${ cve [ 0 ] } ');">` ;
184
+
185
+ try {
186
+ // presumably, when this vulnerability was discovered, browsers did not return `location.hash` encoded.
187
+ // so we can't reproduce the issue without decoding
188
+ $ ( decodeURIComponent ( location . hash ) ) ;
189
+ } catch ( e ) {
190
+ handleJQuerySyntaxError ( e ) ;
191
+ }
192
+
193
+
194
+ }
195
+
196
+ function handleJQuerySyntaxError ( e ) {
197
+
198
+ const JQUERY_SYNTAX_ERROR = 'Syntax error, unrecognized expression' ;
199
+
200
+ const errorMessage = typeof e === 'string' ? e : e . message ;
201
+
202
+ // we expect newer (unaffected) jQuery to throw a syntax error, so ignore it
203
+ if ( ! errorMessage . startsWith ( JQUERY_SYNTAX_ERROR ) ) {
204
+ error ( e ) ;
205
+ }
206
+
183
207
}
184
208
185
209
function CVE_2012_6708 ( cve ) {
186
210
try {
187
211
$ ( `element[attribute='<img src="x" onerror="triggerCVE('${ cve [ 0 ] } ');" />']` ) . html ( ) ;
188
212
} catch ( e ) {
189
- // we expect newer (unaffected) jQuery to throw a syntax error, so ignore it
190
- if ( ! e . message . startsWith ( 'Syntax error, unrecognized expression' ) ) {
191
- error ( e ) ;
192
- }
213
+ handleJQuerySyntaxError ( e ) ;
193
214
}
194
215
}
195
216
@@ -238,5 +259,6 @@ function CVE_2020_11023(cve) {
238
259
}
239
260
240
261
function CVE_2020_23064 ( cve ) {
241
- error ( 'TODO' ) ;
262
+ // this is a duplicate of CVE-2020-11023
263
+ CVE_2020_11023 ( cve ) ;
242
264
}
0 commit comments