usebruno / bruno

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

Invalid characters allowed in request name on Windows #2787

Open oscarcamilopulidop opened 3 months ago

oscarcamilopulidop commented 3 months ago

I have checked the following:

Describe the bug

The current implementation allows invalid characters in the request name field on Windows. This can cause issues with variable names.

For example:

Creating a request name with a ":" in the middle will allow the request to be created, but it won't appear in the left menu like other requests. This will create a file with the name as the string before the ":", with no data inside the folder where the collection is stored. This behavior has been observed while using Bruno on Windows.

.bru file to reproduce the bug

No response

Screenshots/Live demo link

The new request form allows the creation of request names with invalid characters:

image

Once this is done, the request named "Another request : test endpoint" doesn't appear in the left menu:

image

Looking into the folder where the Bruno collection is stored, it creates only a file named "Another request " with no data inside the folder where the collection is stored.

image

ganesh-bruno commented 1 week ago

Hi @oscarcamilopulidop,

Thank you for reporting this issue.

I’ve been able to reproduce it on both Windows and Mac. It’s strange that it works fine on Mac, but as you mentioned, there’s an issue on Windows. I appreciate you sharing the screenshot they’ve been really helpful in understanding the problem.

I’ll discuss this with the team and will share update with you.

Thanks again!

oscarcamilopulidop commented 1 week ago

Hey @ganesh-bruno ,

Thanks for your reply, just in case, I have already made a PR for this issue: https://github.com/usebruno/bruno/pull/2788# Let me know what you think.

Cheers :)

ganesh-bruno commented 1 week ago

Hey @oscarcamilopulidop,

Thanks for pointing this out. We’ll look into it.