Skip to content

Commit

Permalink
Fixed the zip bug related to JSZip upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxNad committed Mar 7, 2023
1 parent 426b93b commit 4759c01
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion backend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"image-size": "^1.0.2",
"js-yaml": "^4.1.0",
"jsonwebtoken": "^9.0.0",
"jszip": "^3.10.1",
"jszip": "^3.1.4",
"lodash": "^4.17.21",
"mongoose": "^7.0.0",
"otpauth": "^9.0.2",
Expand Down
4 changes: 2 additions & 2 deletions backend/src/lib/report-generator.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
var fs = require('fs');
var Docxtemplater = require('docxtemplater');
var JSZip = require('jszip');
var PizZip = require("pizzip");
var expressions = require('angular-expressions');
var ImageModule = require('docxtemplater-image-module-pwndoc');
var sizeOf = require('image-size');
Expand All @@ -19,7 +19,7 @@ async function generateDoc(audit) {
var templatePath = `${__basedir}/../report-templates/${audit.template.name}.${audit.template.ext || 'docx'}`
var content = fs.readFileSync(templatePath, "binary");

var zip = new JSZip(content);
var zip = new PizZip(content);

translate.setLocale(audit.language)
$t = translate.translate
Expand Down

0 comments on commit 4759c01

Please sign in to comment.