Improve validation in the Catalog.prototype.openAction getter
When the /OpenAction data is an Array we're currently using it as-is which could theoretically cause problems in corrupt PDF documents, hence we ensure that a "raw" destination is actually valid. (This change is covered by existing unit-tests.) *Note:* In the Dictionary case we're using the `Catalog.parseDestDictionary` method, which already handles all of the necessary validation.
This commit is contained in:
parent
293506ada7
commit
f26f984fa0
@ -1029,7 +1029,7 @@ class Catalog {
|
||||
} else if (resultObj.action) {
|
||||
openAction.action = resultObj.action;
|
||||
}
|
||||
} else if (Array.isArray(obj)) {
|
||||
} else if (isValidExplicitDest(obj)) {
|
||||
openAction.dest = obj;
|
||||
}
|
||||
return shadow(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user