| OLD | NEW |
| 1 <script> | 1 <script> |
| 2 document.testExpando = "It's me too!"; | 2 document.testExpando = "It's me too!"; |
| 3 | 3 |
| 4 parent.childEval = eval; | 4 parent.childEval = eval; |
| 5 | 5 |
| 6 parent.childEvalCaller = function(s) { | 6 parent.childEvalCaller = (function() |
| 7 return window.eval(s); | 7 { |
| 8 } | 8 // Capture window.window into a variable, since this property always returns
null once |
| 9 // the context is navigated. |
| 10 var w = window; |
| 11 return function(s) { |
| 12 return w.eval(s); |
| 13 } |
| 14 })(); |
| 9 | 15 |
| 10 parent.childLocalEvalCaller = (function() | 16 parent.childLocalEvalCaller = (function() |
| 11 { | 17 { |
| 12 var e = eval; | 18 var e = eval; |
| 13 return function(s) { return e(s); }; | 19 return function(s) { return e(s); }; |
| 14 })(); | 20 })(); |
| 15 | 21 |
| 16 location.href = "http://localhost:8000/security/resources/xss-eval3.html"; | 22 location.href = "http://localhost:8000/security/resources/xss-eval3.html"; |
| 17 </script> | 23 </script> |
| OLD | NEW |