insomnia icon indicating copy to clipboard operation
insomnia copied to clipboard

Bug: cURL importer incorrectly splits payload values containing multiple '=' characters

Open Niraj2003 opened this issue 1 month ago • 1 comments

Expected Behavior

The cURL importer should preserve the entire payload value exactly as provided, even when the value contains multiple '=' characters.
For raw data inputs such as:
-d "token=abc==123==xyz"
…the importer should treat the entire string as a single payload value without truncating or splitting it.

Actual Behavior

The importer incorrectly splits the payload when multiple '=' characters are present.
For example, using: curl -X POST -d "token=abc==123==xyz"

Insomnia imports it as: name: "" value: "token=abc"

All content after the first '=' is lost, which breaks JWT tokens, base64 strings, and other encoded payloads.

Reproduction Steps

  1. Open Insomnia.
  2. Click “Create” → “Import From cURL”.
  3. Paste: curl -X POST -d "token=abc==123==xyz"
  4. Click “Import”.
  5. Observe that the imported body incorrectly truncates the payload after the first '='.

Is there an existing issue for this?

Which sync method do you use?

  • [ ] Git sync.
  • [ ] Insomnia Cloud sync.
  • [x] Local only

Additional Information

The root cause is in the cURL import logic where data flags (-d, --data, --data-raw, etc.) are parsed using pairToParameters(), which splits the string at the first '=' and treats the remainder incorrectly.

This affects:

  • JWT tokens
  • base64 payloads
  • binary form data
  • encrypted or encoded request bodies

Fixing this requires preserving the raw payload as-is unless it's explicitly form-urlencoded.

Insomnia Version

12.0.0

What operating system are you using?

macOS

Operating System Version

macOS Sequoia 15.7.2

Installation method

Downloaded from insomnia.rest

Last Known Working Insomnia version

No response

Niraj2003 avatar Nov 21 '25 12:11 Niraj2003

Hi @Niraj2003, could you please confirm which version of Insomnia you're using? This issue should have been fixed in #9198.

ZxBing0066 avatar Nov 27 '25 06:11 ZxBing0066