Socket
Socket
Sign inDemoInstall

pdfjs

Package Overview
Dependencies
Maintainers
1
Versions
51
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pdfjs - npm Package Compare versions

Comparing version 2.4.2 to 2.4.3

4

CHANGELOG.md

@@ -9,2 +9,6 @@ # Changelog

## [2.4.3] - 2021-04-22
### Fixed
- Fixed escape logic of PDF names [#252](https://github.com/rkusa/pdfjs/pull/252)
## [2.4.2] - 2020-10-23

@@ -11,0 +15,0 @@ ### Fixed

23

lib/object/name.js

@@ -22,7 +22,2 @@ 'use strict'

// delimiter characters are not allowed
if (name.match(/[\(\)<>\[\]\{\}\/\%]/)) {
throw new Error('A Name mustn\'t contain delimiter characters')
}
name = name.toString()

@@ -41,5 +36,21 @@

}
return '#' + code
return '#' + Number(code).toString(16)
})
// Add # in front of delimiter characters
// 25 %
// 28 (
// 29 )
// 2f /
// 3c <
// 3e >
// 5b [
// 5d ]
// 7b {
// 7d }
name = name.replace(/[\x25\x28\x29\x2f\x3c\x3e\x5b\x5d\x7b\x7d]/g, function(c) {
let code = c.charCodeAt(0)
return '#' + Number(code).toString(16)
})
this.name = name

@@ -46,0 +57,0 @@ }

@@ -52,3 +52,3 @@ 'use strict'

const inflate = require('pako/lib/inflate').inflate
const inflate = require('pako/lib/inflate.js').inflate
let res = inflate(obj.content.content)

@@ -55,0 +55,0 @@

{
"name": "pdfjs",
"author": "Markus Ast <npm.m@rkusa.st>",
"version": "2.4.2",
"version": "2.4.3",
"description": "A Portable Document Format (PDF) generation library targeting both the server- and client-side.",

@@ -22,3 +22,3 @@ "keywords": [

"opentype.js": "^1.3.3",
"pako": "^1.0.11",
"pako": "^2.0.3",
"readable-stream": "^3.6.0",

@@ -25,0 +25,0 @@ "unorm": "^1.6.0",

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