Period (.) is not allowed / Source code from repo stopped matching the compiled exe packages?
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
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:
This works fine
When editing request:
Cannot save even without change
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.
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.
@helloanoop @Pragadesh-45 @pooja-bruno Dear developers, can you explain why the dot is prohibited? I'm using the Golden version.
@mark99i This is a regression we have a PR that fixes this, https://github.com/usebruno/bruno/pull/4373. This is currently under review.
@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 My bad. Will track this as a separate issue.
+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...
Trying to create a request inside a collection, trying using "." and sometimes Bruno permits and other does not.