mirror of
https://github.com/alam00000/bentopdf.git
synced 2026-10-18 14:27:13 +02:00
Enforce file origin check in annotation PDF viewer
This commit is contained in:
@@ -2,3 +2,6 @@
|
||||
src/partials/footer.html
|
||||
|
||||
blog/posts/
|
||||
|
||||
public/pdfjs-viewer/
|
||||
public/pdfjs-annotation-viewer/
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
@@ -13514,9 +13514,9 @@ initCom(PDFViewerApplication);
|
||||
return;
|
||||
}
|
||||
const fileOrigin = new URL(file, window.location.href).origin;
|
||||
// if (fileOrigin !== viewerOrigin) {
|
||||
// throw new Error("file origin does not match viewer's");
|
||||
// }
|
||||
if (fileOrigin !== viewerOrigin) {
|
||||
throw new Error("file origin does not match viewer's");
|
||||
}
|
||||
} catch (ex) {
|
||||
PDFViewerApplication._documentError("pdfjs-loading-error", {
|
||||
message: ex.message
|
||||
|
||||
Reference in New Issue
Block a user