[PR #2366] [MERGED] fix: curl parser url sanitisation #3763

Closed
opened 2026-03-17 01:20:58 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/hoppscotch/hoppscotch/pull/2366
Author: @kyteinsky
Created: 5/26/2022
Status: Merged
Merged: 5/27/2022
Merged by: @AndrewBastin

Base: mainHead: fix/curl-parser-url-sanitisation


📝 Commits (4)

  • 646edb7 refactor: remove extra space
  • 21116f5 fix: sanitised url in curl parser
  • c14b8db fix: remove redundant escape characters from json data
  • 4059bb5 refactor: bit more specific since JSON only allows double quotes

📊 Changes

6 files changed (+107 additions, -31 deletions)

View changed files

📝 packages/hoppscotch-app/helpers/curl/__tests__/curlparser.spec.js (+43 -2)
📝 packages/hoppscotch-app/helpers/curl/curlparser.ts (+2 -2)
📝 packages/hoppscotch-app/helpers/curl/sub_helpers/contentParser.ts (+8 -6)
📝 packages/hoppscotch-app/helpers/curl/sub_helpers/preproc.ts (+3 -2)
📝 packages/hoppscotch-app/helpers/curl/sub_helpers/url.ts (+50 -18)
📝 packages/hoppscotch-app/helpers/functional/debug.ts (+1 -1)

📄 Description

  • All Unsafe characters are removed from the url string following RFC 1738
  • All the non-tagged arguments are checked for possible presence of url
  • Some more local url checks were added.

Reference: RFC 1738


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/hoppscotch/hoppscotch/pull/2366 **Author:** [@kyteinsky](https://github.com/kyteinsky) **Created:** 5/26/2022 **Status:** ✅ Merged **Merged:** 5/27/2022 **Merged by:** [@AndrewBastin](https://github.com/AndrewBastin) **Base:** `main` ← **Head:** `fix/curl-parser-url-sanitisation` --- ### 📝 Commits (4) - [`646edb7`](https://github.com/hoppscotch/hoppscotch/commit/646edb7d22a351ed0436c837ea459c4dbc8efcc8) refactor: remove extra space - [`21116f5`](https://github.com/hoppscotch/hoppscotch/commit/21116f5b8ad7800a63c0bca36cbddcc1b0ab0c6b) fix: sanitised url in curl parser - [`c14b8db`](https://github.com/hoppscotch/hoppscotch/commit/c14b8db18054e2f1504a585660e677cbb48cfccf) fix: remove redundant escape characters from json data - [`4059bb5`](https://github.com/hoppscotch/hoppscotch/commit/4059bb5bce6cc6f32dfecba4161b185ec6391ef3) refactor: bit more specific since JSON only allows double quotes ### 📊 Changes **6 files changed** (+107 additions, -31 deletions) <details> <summary>View changed files</summary> 📝 `packages/hoppscotch-app/helpers/curl/__tests__/curlparser.spec.js` (+43 -2) 📝 `packages/hoppscotch-app/helpers/curl/curlparser.ts` (+2 -2) 📝 `packages/hoppscotch-app/helpers/curl/sub_helpers/contentParser.ts` (+8 -6) 📝 `packages/hoppscotch-app/helpers/curl/sub_helpers/preproc.ts` (+3 -2) 📝 `packages/hoppscotch-app/helpers/curl/sub_helpers/url.ts` (+50 -18) 📝 `packages/hoppscotch-app/helpers/functional/debug.ts` (+1 -1) </details> ### 📄 Description - All Unsafe characters are removed from the url string following RFC 1738 - All the non-tagged arguments are checked for possible presence of url - Some more local url checks were added. Reference: [RFC 1738](http://www.faqs.org/rfcs/rfc1738.html) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-17 01:20:58 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hoppscotch#3763
No description provided.