pdf.js/test
Jonas Jenwald ffc847eaa5 Allow over-writing entries, in XRef.indexObjects, only when the generation number matches (issues 11230, 11139, 9552, 9129, 7303)
This patch is making me somewhat worried about future regressions, since it's certainly easy to imagine this completely breaking certain kinds of corrupt/edited PDF documents while fixing others.[1]

Obviously it passes all existing reference tests (and even improves one), however compared to many other patches there's no telling how much it could break.
The only reason that I'm even submitting this patch, is because of the number of open issues that it would address.

Generally speaking though, the best course of action would probably be if `XRef.indexObjects` was re-written to be much more robust (since it currently feels somewhat hand-wavy in parts). E.g. by actually checking/validating more of the objects before committing to them.

---
[1] Especially given that it's reverting part of PR 5910, however in the case of issue 5909 it seems that other (more recent) changes have actually made that PR redundant.
2019-10-14 22:10:04 +02:00
..
chromium Fix inconsistent spacing and trailing commas in objects in test/ files, so we can enable the comma-dangle and object-curly-spacing ESLint rules later on 2017-06-02 13:04:04 +02:00
features Remove usage of mozFillRule 2017-01-29 23:24:44 +01:00
font Resolve deprecation warnings for Jasmine 2018-11-17 23:31:22 +01:00
pdfs Allow over-writing entries, in XRef.indexObjects, only when the generation number matches (issues 11230, 11139, 9552, 9129, 7303) 2019-10-14 22:10:04 +02:00
resources Replace String.prototype.substr() occurrences with String.prototype.substring() 2018-09-28 11:41:07 +02:00
stats Convert some usage of indexOf to startsWith/includes where applicable 2019-01-18 17:57:41 +01:00
ttx Update fonttools location and version (issue 6223) 2015-07-17 12:51:09 +02:00
unit Fix the inconsistent return types for Dict.{get, getAsync} 2019-09-23 11:41:19 +02:00
.eslintrc Fix badly formatted .eslintrc 2018-11-23 13:49:58 +01:00
.gitignore Ignore test snapshots directory. 2013-03-15 11:24:08 -07:00
add_test.js Replace String.prototype.substr() occurrences with String.prototype.substring() 2018-09-28 11:41:07 +02:00
annotation_layer_builder_overrides.css Implement creation/modification date for annotations 2019-05-05 14:51:03 +02:00
downloadutils.js Convert some usage of indexOf to startsWith/includes where applicable 2019-01-18 17:57:41 +01:00
driver.js Enable the eslint-plugin-no-unsanitized ESLint plugin to disallow unsafe usage of e.g. innerHTML 2019-06-23 13:50:30 +02:00
test_manifest.json Allow over-writing entries, in XRef.indexObjects, only when the generation number matches (issues 11230, 11139, 9552, 9129, 7303) 2019-10-14 22:10:04 +02:00
test_slave.html Use the SimpleLinkService when running "annotations" reference tests 2017-09-12 15:24:46 +02:00
test.js Enable the consistent-return ESLint rule 2019-05-11 14:27:21 +02:00
testutils.js Switch to using ESLint, instead of JSHint, for linting 2016-12-16 21:06:36 +01:00
text_layer_test.css Use span instead of div in the text layer 2018-11-18 15:54:08 +01:00
webbrowser.js Convert some usage of indexOf to startsWith/includes where applicable 2019-01-18 17:57:41 +01:00
webserver.js Fixed test/webserver to handle paths correctly on Windows 2019-07-07 02:42:50 +05:30