Skip to content

Commit e7bb6f1

Browse files
fix: pin fast-xml-parser to ~5.6.0 to fix 
 entity validation bug
The @nodable/entities 2.x (used by fast-xml-parser >=5.7.0) introduced a validateEntityName() check that rejects entity names starting with #. This breaks parsing of valid XML numeric character references like 
 (carriage return) in AWS STS responses, causing pipeline-deploy failures. Pin fast-xml-parser to ~5.6.0 which uses @nodable/entities 1.x (no validation bug). Also pin @nodable/entities to ^1.0.0 globally to prevent 2.x from being pulled in transitively. Fixes: aws-amplify/amplify-backend#3172
1 parent bddb2c8 commit e7bb6f1

4 files changed

Lines changed: 22 additions & 18 deletions

File tree

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,7 @@
227227
"@aws-amplify/data-construct/crypt",
228228
"@aws-amplify/data-construct/fast-xml-builder",
229229
"@aws-amplify/data-construct/fast-xml-parser",
230+
"@aws-amplify/data-construct/@nodable/entities",
230231
"@aws-amplify/data-construct/fs-extra",
231232
"@aws-amplify/data-construct/graceful-fs",
232233
"@aws-amplify/data-construct/graphql",
@@ -364,6 +365,7 @@
364365
"@aws-amplify/graphql-api-construct/crypt",
365366
"@aws-amplify/graphql-api-construct/fast-xml-builder",
366367
"@aws-amplify/graphql-api-construct/fast-xml-parser",
368+
"@aws-amplify/graphql-api-construct/@nodable/entities",
367369
"@aws-amplify/graphql-api-construct/fs-extra",
368370
"@aws-amplify/graphql-api-construct/graceful-fs",
369371
"@aws-amplify/graphql-api-construct/graphql",
@@ -463,7 +465,8 @@
463465
"semver": "^7.5.2",
464466
"axios": "^1.15.0",
465467
"braces": "^3.0.3",
466-
"**/aws-amplify/**/fast-xml-parser": "~5.5.12",
468+
"**/aws-amplify/**/fast-xml-parser": "~5.6.0",
469+
"**/@nodable/entities": "^1.0.0",
467470
"@aws-sdk/core/@aws-sdk/xml-builder": "^3.972.15",
468471
"cookie": "^0.7.0",
469472
"@octokit/request-error": "^5.1.1",

packages/amplify-data-construct/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@
145145
"crypt",
146146
"fast-xml-builder",
147147
"fast-xml-parser",
148+
"@nodable/entities",
148149
"fs-extra",
149150
"graceful-fs",
150151
"graphql",
@@ -284,7 +285,8 @@
284285
"ci-info": "^3.2.0",
285286
"crypt": "^0.0.2",
286287
"fast-xml-builder": "1.1.1",
287-
"fast-xml-parser": "5.5.2",
288+
"fast-xml-parser": "~5.6.0",
289+
"@nodable/entities": "^1.0.0",
288290
"fs-extra": "^8.1.0",
289291
"graceful-fs": "^4.2.0",
290292
"graphql": "^15.5.0",

packages/amplify-graphql-api-construct/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@
146146
"crypt",
147147
"fast-xml-builder",
148148
"fast-xml-parser",
149+
"@nodable/entities",
149150
"fs-extra",
150151
"graceful-fs",
151152
"graphql",
@@ -284,7 +285,8 @@
284285
"ci-info": "^3.2.0",
285286
"crypt": "^0.0.2",
286287
"fast-xml-builder": "1.1.1",
287-
"fast-xml-parser": "5.5.2",
288+
"fast-xml-parser": "~5.6.0",
289+
"@nodable/entities": "^1.0.0",
288290
"fs-extra": "^8.1.0",
289291
"graceful-fs": "^4.2.0",
290292
"graphql": "^15.5.0",

yarn.lock

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11538,6 +11538,11 @@
1153811538
resolved "https://registry.npmjs.org/@nicolo-ribaudo/chokidar-2/-/chokidar-2-2.1.8-no-fsevents.3.tgz#323d72dd25103d0c4fbdce89dadf574a787b1f9b"
1153911539
integrity sha512-s88O1aVtXftvp5bCPB7WnmXc5IwOZZ7YPuwNPt+GtOOXpPvad1LfbmjYv+qII7zP6RU2QGnqve27dnLycEnyEQ==
1154011540

11541+
"@nodable/entities@^1.0.0", "@nodable/entities@^1.1.0":
11542+
version "1.1.0"
11543+
resolved "https://registry.yarnpkg.com/@nodable/entities/-/entities-1.1.0.tgz#f98e5ee5a6e987b4cad56eb97be81043d9b8d31d"
11544+
integrity sha512-bidpxmTBP0pOsxULw6XlxzQpTgrAGLDHGBK/JuWhPDL6ZV0GZ/PmN9CA9do6e+A9lYI6qx6ikJUtJYRxup141g==
11545+
1154111546
"@nodelib/fs.scandir@2.1.5":
1154211547
version "2.1.5"
1154311548
resolved "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5"
@@ -18976,18 +18981,19 @@ fast-xml-builder@1.1.1:
1897618981
dependencies:
1897718982
path-expression-matcher "^1.1.3"
1897818983

18979-
fast-xml-builder@^1.1.1, fast-xml-builder@^1.1.4:
18984+
fast-xml-builder@^1.1.4:
1898018985
version "1.1.4"
1898118986
resolved "https://registry.yarnpkg.com/fast-xml-builder/-/fast-xml-builder-1.1.4.tgz#0c407a1d9d5996336c0cd76f7ff785cac6413017"
1898218987
integrity sha512-f2jhpN4Eccy0/Uz9csxh3Nu6q4ErKxf0XIsasomfOihuSUa3/xw6w8dnOtCDgEItQFJG8KyXPzQXzcODDrrbOg==
1898318988
dependencies:
1898418989
path-expression-matcher "^1.1.3"
1898518990

18986-
fast-xml-parser@3.19.0, fast-xml-parser@^3.16.0, fast-xml-parser@~5.5.12:
18987-
version "5.5.12"
18988-
resolved "https://registry.yarnpkg.com/fast-xml-parser/-/fast-xml-parser-5.5.12.tgz#6e50e5a5bbb03c1dc72a9268a9bfe677b1b623b2"
18989-
integrity sha512-nUR0q8PPfoA/svPM43Gup7vLOZWppaNrYgGmrVqrAVJa7cOH4hMG6FX9M4mQ8dZA1/ObGZHzES7Ed88hxEBSJg==
18991+
fast-xml-parser@3.19.0, fast-xml-parser@^3.16.0, fast-xml-parser@~5.6.0:
18992+
version "5.6.0"
18993+
resolved "https://registry.yarnpkg.com/fast-xml-parser/-/fast-xml-parser-5.6.0.tgz#4ade6df478c2532a462b693278fa6393c295a9e3"
18994+
integrity sha512-5G+uaEBbOm9M4dgMOV3K/rBzfUNGqGqoUTaYJM3hBwM8t71w07gxLQZoTsjkY8FtfjabqgQHEkeIySBDYeBmJw==
1899018995
dependencies:
18996+
"@nodable/entities" "^1.1.0"
1899118997
fast-xml-builder "^1.1.4"
1899218998
path-expression-matcher "^1.5.0"
1899318999
strnum "^2.2.3"
@@ -19006,15 +19012,6 @@ fast-xml-parser@5.2.5:
1900619012
dependencies:
1900719013
strnum "^2.1.0"
1900819014

19009-
fast-xml-parser@5.5.2:
19010-
version "5.5.2"
19011-
resolved "https://registry.yarnpkg.com/fast-xml-parser/-/fast-xml-parser-5.5.2.tgz#2c5b9c8d955fe201ecebc2365fc517ed0d329600"
19012-
integrity sha512-kA6Txdt1cHsk+/qWKuV1jZUHBD6QUXWKhWVBuSmfP5YElW5HvJ/yC7eFCS+DQg7LphBPuUoEBMQ+m1z6UlF24w==
19013-
dependencies:
19014-
fast-xml-builder "^1.1.1"
19015-
path-expression-matcher "^1.1.3"
19016-
strnum "^2.1.2"
19017-
1901819015
fast-xml-parser@5.5.8:
1901919016
version "5.5.8"
1902019017
resolved "https://registry.yarnpkg.com/fast-xml-parser/-/fast-xml-parser-5.5.8.tgz#929571ed8c5eb96e6d9bd572ba14fc4b84875716"
@@ -24985,7 +24982,7 @@ strnum@^1.0.5:
2498524982
resolved "https://registry.yarnpkg.com/strnum/-/strnum-1.1.2.tgz#57bca4fbaa6f271081715dbc9ed7cee5493e28e4"
2498624983
integrity sha512-vrN+B7DBIoTTZjnPNewwhx6cBA/H+IS7rfW68n7XxC1y7uoiGQBxaKzqucGUgavX15dJgiGztLJ8vxuEzwqBdA==
2498724984

24988-
strnum@^2.1.0, strnum@^2.1.2, strnum@^2.2.0, strnum@^2.2.3:
24985+
strnum@^2.1.0, strnum@^2.2.0, strnum@^2.2.3:
2498924986
version "2.2.3"
2499024987
resolved "https://registry.yarnpkg.com/strnum/-/strnum-2.2.3.tgz#0119fce02749a11bb126a4d686ac5dbdf6e57586"
2499124988
integrity sha512-oKx6RUCuHfT3oyVjtnrmn19H1SiCqgJSg+54XqURKp5aCMbrXrhLjRN9TjuwMjiYstZ0MzDrHqkGZ5dFTKd+zg==

0 commit comments

Comments
 (0)