New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

docx-templates

Package Overview
Dependencies
Maintainers
1
Versions
63
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

docx-templates - npm Package Compare versions

Comparing version 4.5.1 to 4.5.2

3

CHANGELOG.md

@@ -0,1 +1,4 @@

## 4.5.2 (2020-11-13)
* Corrected check for valid image data. ArrayBuffers are now also valid image data containers, as the type definitions suggest (issue [#166](https://github.com/guigrpa/docx-templates/issues/166)).
## 4.5.1 (2020-10-24)

@@ -2,0 +5,0 @@ * Enhancement: extensive validation of `IMAGE` command parameters before execution to prevent silent failures caused by user error, particularly in plain javascript and untyped settings. Related to issue [#158](https://github.com/guigrpa/docx-templates/issues/158).

6

lib/processTemplate.js

@@ -703,4 +703,6 @@ "use strict";

function validateImage(img) {
if (!(img.data instanceof Buffer || typeof img.data === 'string')) {
throw new Error('image .data property needs to be provided as an ArrayBuffer-equivalent or as a base64-encoded string');
if (!(img.data instanceof Buffer ||
img.data instanceof ArrayBuffer ||
typeof img.data === 'string')) {
throw new Error('image .data property needs to be provided as Buffer, ArrayBuffer, or as a base64-encoded string');
}

@@ -707,0 +709,0 @@ if (!types_1.ImageExtensions.includes(img.extension)) {

@@ -153,3 +153,3 @@ /// <reference types="node" />

extension: ImageExtension;
data: ArrayBuffer | string;
data: Buffer | ArrayBuffer | string;
};

@@ -156,0 +156,0 @@ export declare type Links = {

{
"name": "docx-templates",
"version": "4.5.1",
"version": "4.5.2",
"description": "Template-based docx report creation",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc