Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fast-xml-parser

Package Overview
Dependencies
Maintainers
1
Versions
136
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fast-xml-parser - npm Package Compare versions

Comparing version 4.2.2 to 4.2.3

3

CHANGELOG.md
Note: If you find missing information about particular minor version, that version must have been changed without any functional change in this library.
**4.2.3 / 2023-06-05**
* fix security bug
**4.2.2 / 2023-04-18**

@@ -4,0 +7,0 @@ * fix #562: fix unpaired tag when it comes in last of a nested tag. Also throw error when unpaired tag is used as closing tag

2

package.json
{
"name": "fast-xml-parser",
"version": "4.2.2",
"version": "4.2.3",
"description": "Validate XML, Parse XML, Build XML without C/C++ based libraries",

@@ -5,0 +5,0 @@ "main": "./src/fxp.js",

@@ -22,3 +22,3 @@ //TODO: handle comments

if(val.indexOf("&") === -1) //Parameter entities are not supported
entities[ entityName ] = {
entities[ validateEntityName(entityName) ] = {
regx : RegExp( `&${entityName};`,"g"),

@@ -144,2 +144,14 @@ val: val

//an entity name should not contains special characters that may be used in regex
//Eg !?\\\/[]$%{}^&*()<>
const specialChar = "!?\\\/[]$%{}^&*()<>";
function validateEntityName(name){
for (let i = 0; i < specialChar.length; i++) {
const ch = specialChar[i];
if(name.indexOf(ch) !== -1) throw new Error(`Invalid character ${ch} in entity name`);
}
return name;
}
module.exports = readDocType;
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