Skip to content

Fix JSDoc comment security vulnerability: escape only necessary */ sequences #2422

Fix JSDoc comment security vulnerability: escape only necessary */ sequences

Fix JSDoc comment security vulnerability: escape only necessary */ sequences #2422

Status Failure
Total duration 1m 12s
Artifacts

main.yml

on: pull_request
Matrix: build-and-test
Fit to window
Zoom out
Zoom in

Annotations

6 errors
build-and-test (24)
Process completed with exit code 1.
tests/spec/jsdoc-escaping/basic.test.ts > jsdoc-escaping > should escape JSDoc comment characters in descriptions: tests/spec/jsdoc-escaping/basic.test.ts#L43
Error: Snapshot `jsdoc-escaping > should escape JSDoc comment characters in descriptions 1` mismatched - Expected + Received @@ -144,23 +144,28 @@ : input, [ContentType.Text]: (input: any) => input !== null && typeof input !== "string" ? JSON.stringify(input) : input, - [ContentType.FormData]: (input: any) => - Object.keys(input || {}).reduce((formData, key) => { + [ContentType.FormData]: (input: any) => { + if (input instanceof FormData) { + return input; + } + + return Object.keys(input || {}).reduce((formData, key) => { const property = input[key]; formData.append( key, property instanceof Blob ? property : typeof property === "object" && property !== null ? JSON.stringify(property) : `${property}`, ); return formData; - }, new FormData()), + }, new FormData()); + }, [ContentType.UrlEncoded]: (input: any) => this.toQueryString(input), }; protected mergeRequestParams( params1: RequestParams, ❯ tests/spec/jsdoc-escaping/basic.test.ts:43:21
build-and-test (22)
Process completed with exit code 1.
tests/spec/jsdoc-escaping/basic.test.ts > jsdoc-escaping > should escape JSDoc comment characters in descriptions: tests/spec/jsdoc-escaping/basic.test.ts#L43
Error: Snapshot `jsdoc-escaping > should escape JSDoc comment characters in descriptions 1` mismatched - Expected + Received @@ -144,23 +144,28 @@ : input, [ContentType.Text]: (input: any) => input !== null && typeof input !== "string" ? JSON.stringify(input) : input, - [ContentType.FormData]: (input: any) => - Object.keys(input || {}).reduce((formData, key) => { + [ContentType.FormData]: (input: any) => { + if (input instanceof FormData) { + return input; + } + + return Object.keys(input || {}).reduce((formData, key) => { const property = input[key]; formData.append( key, property instanceof Blob ? property : typeof property === "object" && property !== null ? JSON.stringify(property) : `${property}`, ); return formData; - }, new FormData()), + }, new FormData()); + }, [ContentType.UrlEncoded]: (input: any) => this.toQueryString(input), }; protected mergeRequestParams( params1: RequestParams, ❯ tests/spec/jsdoc-escaping/basic.test.ts:43:21
build-and-test (20)
Process completed with exit code 1.
tests/spec/jsdoc-escaping/basic.test.ts > jsdoc-escaping > should escape JSDoc comment characters in descriptions: tests/spec/jsdoc-escaping/basic.test.ts#L43
Error: Snapshot `jsdoc-escaping > should escape JSDoc comment characters in descriptions 1` mismatched - Expected + Received @@ -144,23 +144,28 @@ : input, [ContentType.Text]: (input: any) => input !== null && typeof input !== "string" ? JSON.stringify(input) : input, - [ContentType.FormData]: (input: any) => - Object.keys(input || {}).reduce((formData, key) => { + [ContentType.FormData]: (input: any) => { + if (input instanceof FormData) { + return input; + } + + return Object.keys(input || {}).reduce((formData, key) => { const property = input[key]; formData.append( key, property instanceof Blob ? property : typeof property === "object" && property !== null ? JSON.stringify(property) : `${property}`, ); return formData; - }, new FormData()), + }, new FormData()); + }, [ContentType.UrlEncoded]: (input: any) => this.toQueryString(input), }; protected mergeRequestParams( params1: RequestParams, ❯ tests/spec/jsdoc-escaping/basic.test.ts:43:21