question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Bug] Switching environments will re-use a stale chained request value

See original GitHub issue
  • Insomnia Version: 5.12.4
  • Operating System: Windows 10 Pro (10.0.16299.125)

Details

If a workspace contains a chained request value (e.g. a bearer token) and there is more than one environment (e.g. development and staging), if a request is executed in development that requires a chained request value, that value will persist if switching to the other environments.

Steps to Reproduce

  1. Create “Development” environment
  2. Create “Staging” environment
  3. Create POST request which retrieves OAuth 2.0 Bearer token
  4. Create GET request which requires Authorization: Bearer <token> header
  5. Fill Auth Bearer Token value with Response => Body Attribute macro, executing the POST Token request from Step 3.
  6. Execute request, and ensure bearer token was used in the request successfully
  7. Switch environments
  8. Execute the same request. Note that the previous bearer token was cached and used as part of the request (and, presumably, you will get either a 400 Bad Request or 401 Unauthorized error).

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:4
  • Comments:15 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
fcottetcommented, May 4, 2020

This is very similar to issue #260 It would be awesome to see these 2 questions solved in a similar manner - like an option at the workspace level to reset all the stored responses/tokens when switching between environments.

2reactions
gschiercommented, Apr 23, 2018

Yep, now it won’t close 😄

Read more comments on GitHub >

github_iconTop Results From Across the Web

Downstream pipelines - GitLab Docs
A pipeline in one project can trigger downstream pipelines in another project, called multi-project pipelines. The user triggering the upstream pipeline must be ......
Read more >
SettingwithCopyWarning: How to Fix This Warning in Pandas
We have set a value on a copy of a slice but it was not detected by pandas – this is a false...
Read more >
Dockerfile reference - Docker Documentation
Environment variables are notated in the Dockerfile either with $variable_name or ${variable_name} . They are treated equivalently and the brace syntax is ......
Read more >
29. Cache Abstraction - Spring
In this case, each of the caches will be checked before executing the method - if at least one cache is hit, then...
Read more >
Privilege Escalation Attack & Defense Explained - BeyondTrust
A standard user rarely has rights to a database, sensitive files, or anything of value. So, how does a threat actor navigate an...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found