Skip to content

Commit f26f984

Browse files
committed
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.
1 parent 293506a commit f26f984

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/core/catalog.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1029,7 +1029,7 @@ class Catalog {
10291029
} else if (resultObj.action) {
10301030
openAction.action = resultObj.action;
10311031
}
1032-
} else if (Array.isArray(obj)) {
1032+
} else if (isValidExplicitDest(obj)) {
10331033
openAction.dest = obj;
10341034
}
10351035
return shadow(

0 commit comments

Comments
 (0)