foundry
foundry copied to clipboard
RuntimeTransport jwt is broken
Component
Cast
Have you ensured that all of these are up to date?
- [ ] Foundry
- [ ] Foundryup
What version of Foundry are you on?
No response
What command(s) is the bug in?
No response
Operating System
None
Describe the bug
Currently the jwt will not be included in the requests made by RuntimeTransport:
https://github.com/foundry-rs/foundry/blob/23700c9233314e06ba65be4522daf3aa89130dc0/crates/common/src/provider/runtime_transport.rs#L153-L159
This is because the alloy ToString implementation ignores any details of the bearer token: https://github.com/alloy-rs/alloy/blob/b9f9f9f08db3cba4d3ac9d79d88c18005763bd57/crates/transport/src/common.rs#L48-L55
This will be set as a header value here: https://github.com/foundry-rs/foundry/blob/23700c9233314e06ba65be4522daf3aa89130dc0/crates/common/src/provider/runtime_transport.rs#L158
which means the header will just be Bearer
should be fixed by https://github.com/alloy-rs/alloy/pull/772