bruno icon indicating copy to clipboard operation
bruno copied to clipboard

Period (.) is not allowed / Source code from repo stopped matching the compiled exe packages?

Open mark99i opened this issue 1 year ago • 1 comments

I have checked the following:

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

Describe the bug

I am using the golden version of bruno (bought it in pre-order) and have run into the problem that I cannot rename api methods to a name containing a dot. I also cannot create a new method containing the dot symbol. but at the same time, I can clone an existing method containing a dot symbol - there are no errors for this

I checked the main branch of the current repository and did not find any related commits, I also ran the main branch in my dev mode and also did not find this problem. are you building exe and other packages not from this repository?

if this is the case, then there are doubts regarding the security of the code contained in the assembled packages. if this is related to paid subscription modules, then you can download them dynamically (from your server over https, for example)

.bru file to reproduce the bug

none

Screenshots/Live demo link

image image

mark99i avatar Apr 15 '24 09:04 mark99i

I noticed the same/similar behavior. I can create new Request with dots in the name but cannot rename them afterwards when they still contain a dot When creating request: image This works fine

When editing request: image Cannot save even without change

gengurke avatar Aug 16 '24 13:08 gengurke

Indeed, it appears that this condition is not in place in this repository.

This is what the code for the renaming step looks like in the debugger, when installed through snap:

validationSchema: n6.object({
    name: n6.string()
        .matches(/^[^.]*$/, "Period (.) is not allowed") // <---- Added
        .min(1, "must be at least 1 character")
        .max(255, "must be 255 characters or less")
        .required("name is required"),
    filename: n6.string()
        .min(1, "must be at least 1 character")
        .max(255, "must be 255 characters or less")
        .required("name is required")
        .test("is-valid-name", function(t) {
            return !!ii(t) || this.createError({
                message: io(t)
            }
        )
    }).test("not-reserved", 'The file names "collection" and "folder" are reserved in bruno', t => !["collection", "folder"].includes(t))
}),

This does not match the code in https://github.com/usebruno/bruno/blob/526fcabffef8afe77274395a176385cf35f73819/packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/RenameCollectionItem/index.js#L38-L52.

StephenBeirlaen avatar Apr 30 '25 11:04 StephenBeirlaen

Yes, this will also be true for many other places in the source code. The released version of Bruno is proprietary, its source code is in another repo that is built upon the code from this repo and includes the Golden Edition features.

Its-treason avatar Apr 30 '25 13:04 Its-treason

@helloanoop @Pragadesh-45 @pooja-bruno Dear developers, can you explain why the dot is prohibited? I'm using the Golden version.

mark99i avatar May 01 '25 21:05 mark99i

@mark99i This is a regression we have a PR that fixes this, https://github.com/usebruno/bruno/pull/4373. This is currently under review.

anusree-bruno avatar May 02 '25 06:05 anusree-bruno

@mark99i This is a regression we have a PR that fixes this, #4373. This is currently under review.

Hi, that PR seems to be about leading dots, while this issue is about dots in general. With the linked PR merged (on 2.3.0) I am still unable to rename requests to myresource.list, however I can create new ones with such a name without issues.

StephenBeirlaen avatar May 15 '25 13:05 StephenBeirlaen

@StephenBeirlaen My bad. Will track this as a separate issue.

anusree-bruno avatar May 15 '25 13:05 anusree-bruno

+1

There was an issue some time ago regarding the same thing, just http:// (urls).

Here's a tip: Allow the user to name their requests whatever. When you make the actual filename just escape all non-alphabetical characters with -. It really should be that easy

Bonus! With one line of code (or less) you can truncate multiple - to make it even nicer...

Image

fractalf avatar Jun 10 '25 13:06 fractalf

Trying to create a request inside a collection, trying using "." and sometimes Bruno permits and other does not.

dverzolla avatar Sep 08 '25 13:09 dverzolla