Skip to content
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

Bruno crashes when trying to save Multipart Form Requests with certain values #2401

Closed
2 tasks done
lwilli opened this issue May 31, 2024 · 2 comments · Fixed by #2407
Closed
2 tasks done

Bruno crashes when trying to save Multipart Form Requests with certain values #2401

lwilli opened this issue May 31, 2024 · 2 comments · Fixed by #2407
Assignees
Labels
bug Something isn't working

Comments

@lwilli
Copy link

lwilli commented May 31, 2024

I have checked the following:

  • I use the newest version of bruno.
  • I've searched existing issues and found nothing related to my issue.

Describe the bug

Bruno doesn't seem to handle certain Multipart Form values very well. Specifically, if the values include newlines or sometimes multiple spaces, Bruno fails to save the request file and will crash when quitting Bruno and selecting Save on the UNSAVED CHANGES dialog.

This issue seems to happen when the multipart values contain newlines and also happens if you type " " (two spaces) as the part value.

I tested this with a fresh install of v1.18.0 on macOS.

Some more background: This particular functionality would be nice to have for GraphQL multipart requests, since the operations part is a JSON object value (we follow https://workday.github.io/graphql-multipart-request-spec/graphql-multipart-request-v3.html#sec-Operations-Part). It's not a complete blocker though since I was able to find the workaround of removing the newlines from the value, though that was not immediately obvious.

.bru file to reproduce the bug

meta {
  name: Multipart bug demo
  type: http
  seq: 3
}

post {
  url: https://example.org
  body: multipartForm
  auth: none
}

body:multipart-form {
  operations: {
  	"query": "mutation ..."
  }
}

Screenshots/Live demo link

Demo of me trying to save a request with a multiline part value:
Bruno Multipart Form Save Bug Demo
Notice the toast notification indicates a successful save, but the request tab still has the little orange dot. And then when I try to quit Bruno, it tells me the request isn't saved. Then, when I click Save there, it crashes Bruno. After reopening Bruno, the request is not successfully loaded.

@lwilli lwilli added the bug Something isn't working label May 31, 2024
@sanjai0py sanjai0py self-assigned this Jun 1, 2024
@sanjai0py sanjai0py mentioned this issue Jun 3, 2024
5 tasks
@lwilli
Copy link
Author

lwilli commented Jun 5, 2024

Thanks for the quick fix! 😄

@helloanoop
Copy link
Contributor

This has been released in v1.9.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants