-
Notifications
You must be signed in to change notification settings - Fork 9.2k
Fixes #10540 — Vertical bar character | not escaped in cURL (CMD) request snippet body #10596
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 5 commits
1cc3f61
5c4a6ff
cd5a5f4
7817108
de1eb15
52824ee
957a524
7a3f6a3
a007477
3be6f2f
26ac9c9
8061728
fabb391
189ed8d
4c7faf5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| <!doctype html> | ||
| <html lang="en-US"> | ||
| <body> | ||
| <script src="oauth2-redirect.js"></script> | ||
| </body> | ||
| </html> | ||
| <script src="oauth2-redirect.js"></script> |
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,103 @@ | ||
| /*! | ||
| Copyright (c) 2018 Jed Watson. | ||
| Licensed under the MIT License (MIT), see | ||
| http://jedwatson.github.io/classnames | ||
| */ | ||
| /*! | ||
| * @description Recursive object extending | ||
| * @author Viacheslav Lotsmanov <[email protected]> | ||
| * @license MIT | ||
| * | ||
| * The MIT License (MIT) | ||
| * | ||
| * Copyright (c) 2013-2018 Viacheslav Lotsmanov | ||
| * | ||
| * Permission is hereby granted, free of charge, to any person obtaining a copy of | ||
| * this software and associated documentation files (the "Software"), to deal in | ||
| * the Software without restriction, including without limitation the rights to | ||
| * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of | ||
| * the Software, and to permit persons to whom the Software is furnished to do so, | ||
| * subject to the following conditions: | ||
| * | ||
| * The above copyright notice and this permission notice shall be included in all | ||
| * copies or substantial portions of the Software. | ||
| * | ||
| * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS | ||
| * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR | ||
| * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER | ||
| * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | ||
| * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
| */ | ||
| /*! | ||
| * The buffer module from node.js, for the browser. | ||
| * | ||
| * @author Feross Aboukhadijeh <https://feross.org> | ||
| * @license MIT | ||
| */ | ||
| /*! | ||
| * https://github.com/Starcounter-Jack/JSON-Patch | ||
| * (c) 2017-2021 Joachim Wester | ||
| * MIT license | ||
| */ | ||
|
|
||
| /*! | ||
| * https://github.com/Starcounter-Jack/JSON-Patch | ||
| * (c) 2017-2022 Joachim Wester | ||
| * MIT licensed | ||
| */ | ||
|
|
||
| /*! | ||
| * repeat-string <https://github.com/jonschlinkert/repeat-string> | ||
| * | ||
| * Copyright (c) 2014-2015, Jon Schlinkert. | ||
| * Licensed under the MIT License. | ||
| */ | ||
|
|
||
| /*! @license DOMPurify 3.2.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.6/LICENSE */ | ||
|
|
||
| /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */ | ||
|
|
||
| /*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */ | ||
|
|
||
| /*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */ | ||
|
|
||
| /** | ||
| * @license React | ||
| * react-dom.production.min.js | ||
| * | ||
| * Copyright (c) Facebook, Inc. and its affiliates. | ||
| * | ||
| * This source code is licensed under the MIT license found in the | ||
| * LICENSE file in the root directory of this source tree. | ||
| */ | ||
|
|
||
| /** | ||
| * @license React | ||
| * react.production.min.js | ||
| * | ||
| * Copyright (c) Facebook, Inc. and its affiliates. | ||
| * | ||
| * This source code is licensed under the MIT license found in the | ||
| * LICENSE file in the root directory of this source tree. | ||
| */ | ||
|
|
||
| /** | ||
| * @license React | ||
| * scheduler.production.min.js | ||
| * | ||
| * Copyright (c) Facebook, Inc. and its affiliates. | ||
| * | ||
| * This source code is licensed under the MIT license found in the | ||
| * LICENSE file in the root directory of this source tree. | ||
| */ | ||
|
|
||
| /** | ||
| * @license React | ||
| * use-sync-external-store-with-selector.production.js | ||
| * | ||
| * Copyright (c) Meta Platforms, Inc. and affiliates. | ||
| * | ||
| * This source code is licensed under the MIT license found in the | ||
| * LICENSE file in the root directory of this source tree. | ||
| */ |
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| /*! | ||
| * @description Recursive object extending | ||
| * @author Viacheslav Lotsmanov <[email protected]> | ||
| * @license MIT | ||
| * | ||
| * The MIT License (MIT) | ||
| * | ||
| * Copyright (c) 2013-2018 Viacheslav Lotsmanov | ||
| * | ||
| * Permission is hereby granted, free of charge, to any person obtaining a copy of | ||
| * this software and associated documentation files (the "Software"), to deal in | ||
| * the Software without restriction, including without limitation the rights to | ||
| * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of | ||
| * the Software, and to permit persons to whom the Software is furnished to do so, | ||
| * subject to the following conditions: | ||
| * | ||
| * The above copyright notice and this permission notice shall be included in all | ||
| * copies or substantial portions of the Software. | ||
| * | ||
| * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS | ||
| * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR | ||
| * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER | ||
| * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | ||
| * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
| */ | ||
| /*! | ||
| * The buffer module from node.js, for the browser. | ||
| * | ||
| * @author Feross Aboukhadijeh <https://feross.org> | ||
| * @license MIT | ||
| */ | ||
| /*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */ |
Large diffs are not rendered by default.
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,103 @@ | ||
| /*! | ||
| Copyright (c) 2018 Jed Watson. | ||
| Licensed under the MIT License (MIT), see | ||
| http://jedwatson.github.io/classnames | ||
| */ | ||
| /*! | ||
| * @description Recursive object extending | ||
| * @author Viacheslav Lotsmanov <[email protected]> | ||
| * @license MIT | ||
| * | ||
| * The MIT License (MIT) | ||
| * | ||
| * Copyright (c) 2013-2018 Viacheslav Lotsmanov | ||
| * | ||
| * Permission is hereby granted, free of charge, to any person obtaining a copy of | ||
| * this software and associated documentation files (the "Software"), to deal in | ||
| * the Software without restriction, including without limitation the rights to | ||
| * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of | ||
| * the Software, and to permit persons to whom the Software is furnished to do so, | ||
| * subject to the following conditions: | ||
| * | ||
| * The above copyright notice and this permission notice shall be included in all | ||
| * copies or substantial portions of the Software. | ||
| * | ||
| * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS | ||
| * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR | ||
| * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER | ||
| * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | ||
| * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
| */ | ||
| /*! | ||
| * The buffer module from node.js, for the browser. | ||
| * | ||
| * @author Feross Aboukhadijeh <https://feross.org> | ||
| * @license MIT | ||
| */ | ||
| /*! | ||
| * https://github.com/Starcounter-Jack/JSON-Patch | ||
| * (c) 2017-2021 Joachim Wester | ||
| * MIT license | ||
| */ | ||
|
|
||
| /*! | ||
| * https://github.com/Starcounter-Jack/JSON-Patch | ||
| * (c) 2017-2022 Joachim Wester | ||
| * MIT licensed | ||
| */ | ||
|
|
||
| /*! | ||
| * repeat-string <https://github.com/jonschlinkert/repeat-string> | ||
| * | ||
| * Copyright (c) 2014-2015, Jon Schlinkert. | ||
| * Licensed under the MIT License. | ||
| */ | ||
|
|
||
| /*! @license DOMPurify 3.2.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.6/LICENSE */ | ||
|
|
||
| /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */ | ||
|
|
||
| /*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */ | ||
|
|
||
| /*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */ | ||
|
|
||
| /** | ||
| * @license React | ||
| * react-dom.production.min.js | ||
| * | ||
| * Copyright (c) Facebook, Inc. and its affiliates. | ||
| * | ||
| * This source code is licensed under the MIT license found in the | ||
| * LICENSE file in the root directory of this source tree. | ||
| */ | ||
|
|
||
| /** | ||
| * @license React | ||
| * react.production.min.js | ||
| * | ||
| * Copyright (c) Facebook, Inc. and its affiliates. | ||
| * | ||
| * This source code is licensed under the MIT license found in the | ||
| * LICENSE file in the root directory of this source tree. | ||
| */ | ||
|
|
||
| /** | ||
| * @license React | ||
| * scheduler.production.min.js | ||
| * | ||
| * Copyright (c) Facebook, Inc. and its affiliates. | ||
| * | ||
| * This source code is licensed under the MIT license found in the | ||
| * LICENSE file in the root directory of this source tree. | ||
| */ | ||
|
|
||
| /** | ||
| * @license React | ||
| * use-sync-external-store-with-selector.production.js | ||
| * | ||
| * Copyright (c) Meta Platforms, Inc. and affiliates. | ||
| * | ||
| * This source code is licensed under the MIT license found in the | ||
| * LICENSE file in the root directory of this source tree. | ||
| */ |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| /*! | ||
| * The buffer module from node.js, for the browser. | ||
| * | ||
| * @author Feross Aboukhadijeh <https://feross.org> | ||
| * @license MIT | ||
| */ | ||
| /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */ | ||
| /*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */ | ||
| /*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */ | ||
|
|
||
| /** | ||
| * @license React | ||
| * react.production.min.js | ||
| * | ||
| * Copyright (c) Facebook, Inc. and its affiliates. | ||
| * | ||
| * This source code is licensed under the MIT license found in the | ||
| * LICENSE file in the root directory of this source tree. | ||
| */ |
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,18 @@ | ||||||
| import { escapeCMD } from "../../../../../src/core/plugins/request-snippets/fn" | ||||||
|
|
||||||
| describe("escapeCMD", () => { | ||||||
| it("escapes vertical bar | with caret ^ for CMD", () => { | ||||||
| const input = 'foo|bar'; | ||||||
|
||||||
| const input = 'foo|bar'; | |
| const input = "foo|bar" |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| const output = escapeCMD(input); | |
| const output = escapeCMD(input) |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| expect(output).toContain('^|'); | |
| expect(output).toContain("^|") |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| }); | |
| }) |
Divyanshu-Mishra9620 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| expect(escapeCMD('foo^bar')).toContain('^^'); | |
| expect(escapeCMD("foo^bar")).toContain("^^") |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| expect(escapeCMD('foo"bar')).toContain('""'); | |
| expect(escapeCMD('foo"bar')).toContain('""') |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| }); | |
| }) |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| }); | |
| }) |
Uh oh!
There was an error while loading. Please reload this page.