usebruno / bruno

Opensource IDE For Exploring and Testing Api's (lightweight alternative to postman/insomnia)
https://www.usebruno.com/
MIT License
27.26k stars 1.25k forks source link

typing `\` in the search bar crash Bruno #3051

Closed Aviortheking closed 2 months ago

Aviortheking commented 2 months ago

I have checked the following:

Describe the bug

When searching for informations in a request's response I typed \ as the first character and the application crashed

I also fetched the erorr in the console:

779-f67e1698eec5c86a.js:1 Uncaught SyntaxError: Invalid regular expression: /\/gi: \ at end of pattern
    at RegExp (<anonymous>)
    at HTMLInputElement.<anonymous> (779-f67e1698eec5c86a.js:1:152742)

.bru file to reproduce the bug

doesn't matter but I include one just in case

meta {
  name: Get one card
  type: http
  seq: 2
}

get {
  url: https://api.tcgdex.net/v2/en/cards/swsh3-136
  body: none
  auth: none
}

assert {
  res.status: eq 200
  res.body.id: eq swsh3-136
}

Screenshots/Live demo link

before typing \ in the search bar image

after : image

sanjai0py commented 2 months ago

Hey @Aviortheking, thanks for taking the time to report this! A PR fixing the issue has been merged and will be available in the next patch release!

Aviortheking commented 2 months ago

Awesome thanks !