Merge branch 'security-55503-fix-pdf-js-vulnerability' into 'master'

Fix PDF.js vulnerability

See merge request gitlab/gitlabhq!2999
This commit is contained in:
GitLab Release Tools Bot 2019-04-02 07:48:26 +00:00
commit 02dcecdb5f
8 changed files with 54096 additions and 35395 deletions

View file

@ -28,7 +28,7 @@ export default {
},
watch: { pdf: 'load' },
mounted() {
pdfjsLib.PDFJS.workerSrc = workerSrc;
pdfjsLib.GlobalWorkerOptions.workerSrc = workerSrc;
if (this.hasPDF) this.load();
},
methods: {

View file

@ -0,0 +1,5 @@
---
title: Fix PDF.js vulnerability
merge_request:
author:
type: security

View file

@ -1,11 +1,11 @@
import Vue from 'vue';
import { PDFJS } from 'vendor/pdf';
import { GlobalWorkerOptions } from 'vendor/pdf';
import workerSrc from 'vendor/pdf.worker.min';
import PDFLab from '~/pdf/index.vue';
import pdf from '../fixtures/blob/pdf/test.pdf';
PDFJS.workerSrc = workerSrc;
GlobalWorkerOptions.workerSrc = workerSrc;
const Component = Vue.extend(PDFLab);
describe('PDF component', () => {

View file

@ -12,7 +12,7 @@ describe('Page component', () => {
let testPage;
beforeEach(done => {
pdfjsLib.PDFJS.workerSrc = workerSrc;
pdfjsLib.GlobalWorkerOptions.workerSrc = workerSrc;
pdfjsLib
.getDocument(testPDF)
.then(pdf => pdf.getPage(1))

24460
vendor/assets/javascripts/pdf.js vendored Executable file → Normal file

File diff suppressed because it is too large Load diff

7
vendor/assets/javascripts/pdf.min.js vendored Executable file → Normal file

File diff suppressed because one or more lines are too long

64991
vendor/assets/javascripts/pdf.worker.js vendored Executable file → Normal file

File diff suppressed because it is too large Load diff

20
vendor/assets/javascripts/pdf.worker.min.js vendored Executable file → Normal file

File diff suppressed because one or more lines are too long