| Tom Sepez | 0d44131 | 2019-02-14 21:02:00 +0000 | [diff] [blame] | 1 | {{header}} |
| 2 | {{object 1 0}} << |
| 3 | /Type /Catalog |
| 4 | /Pages 2 0 R |
| 5 | /OpenAction 10 0 R |
| 6 | >> |
| 7 | endobj |
| 8 | {{object 2 0}} << |
| 9 | /Type /Pages |
| 10 | /Count 1 |
| 11 | /Kids [ |
| 12 | 3 0 R |
| 13 | ] |
| 14 | >> |
| 15 | endobj |
| 16 | % Page number 0. |
| 17 | {{object 3 0}} << |
| 18 | /Type /Page |
| 19 | /Parent 2 0 R |
| 20 | /MediaBox [0 0 612 792] |
| 21 | >> |
| Lei Zhang | 432c19c | 2020-02-07 17:40:10 +0000 | [diff] [blame] | 22 | endobj |
| Tom Sepez | 0d44131 | 2019-02-14 21:02:00 +0000 | [diff] [blame] | 23 | % OpenAction action |
| 24 | {{object 10 0}} << |
| 25 | /Type /Action |
| 26 | /S /JavaScript |
| 27 | /JS 11 0 R |
| 28 | >> |
| 29 | endobj |
| Lei Zhang | 329a5da | 2020-02-07 17:32:00 +0000 | [diff] [blame] | 30 | % JS program to execute |
| Tom Sepez | 0d44131 | 2019-02-14 21:02:00 +0000 | [diff] [blame] | 31 | {{object 11 0}} << |
| 32 | {{streamlen}} |
| 33 | >> |
| 34 | stream |
| 35 | function expectUnsupportedDangerousFeature(what) { |
| 36 | try { |
| 37 | var result = eval("typeof " + what); |
| 38 | if (result == "undefined") { |
| 39 | app.alert('PASS: ' + what + ' is not implemented'); |
| 40 | } else { |
| 41 | app.alert('FAIL: ' + what + ' is implemented, probably a bad idea.'); |
| 42 | app.alert('FAIL: see https://crbug.com/853237'); |
| 43 | } |
| 44 | } catch (e) { |
| 45 | app.alert('Unexpected error ' + e.toString()); |
| 46 | } |
| 47 | } |
| 48 | |
| 49 | try { |
| 50 | expectUnsupportedDangerousFeature("ADBC"); |
| 51 | expectUnsupportedDangerousFeature("Directory"); |
| 52 | expectUnsupportedDangerousFeature("Net"); |
| 53 | expectUnsupportedDangerousFeature("dbg"); |
| 54 | expectUnsupportedDangerousFeature("security"); |
| 55 | } catch (e) { |
| 56 | app.alert('Truly unexpected error: ' + e); |
| 57 | } |
| 58 | endstream |
| 59 | endobj |
| 60 | {{xref}} |
| 61 | {{trailer}} |
| 62 | {{startxref}} |
| 63 | %%EOF |