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

Request vars in body referring to environment vars are not interpolated when listed subsequently #2669

Open
2 tasks done
Sylvannes opened this issue Jul 19, 2024 · 0 comments
Labels

Comments

@Sylvannes
Copy link

Sylvannes commented Jul 19, 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

Took us a while to figure this one out, because at first we thought this must be the #1910 bug, but apparently it's a little bit more nuanced than that.

Bug: When creating request vars that reference environment vars in the POST body of a request (both TEXT and JSON), you cannot list them subsequently in the POST body or any subsequent replacements (beyond the first!) are not done.

Example. I have two request vars that reference environment vars:

image

These are valid secrets in my active environment and you can see that in the request they are listed green due to their interpolation (irrelevant UUIDs to display the bug):

image

And I use them in my POST body as such:

image

In this case, only the FIRST value will be replaced as shown in the timeline of the request:

image

This is true for any amount of subsequent request var -> env var interpolations.

BUT if we throw a local request var (without interpolation) in between, it will work, e.g. this request:

image

Does suddenly interpolate both reference values properly:

image

Looks like some sort of loop error when interpolating nested variables multiple times in a row.

---- edit: This was tested on both Windows and Linux platforms and reproducible on both.

Thank you for building great software, we are very happy to start switching over to using Bruno.

@Sylvannes Sylvannes added the bug Something isn't working label Jul 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants