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

bug: legacy adapter scrambles URLs with query parameters #1988

Closed
MartinquaXD opened this issue Oct 18, 2023 · 0 comments · Fixed by #1989
Closed

bug: legacy adapter scrambles URLs with query parameters #1988

MartinquaXD opened this issue Oct 18, 2023 · 0 comments · Fixed by #1989
Labels
bug Something isn't working E:3.1 Driver Colocation See https://github.com/cowprotocol/pm/issues/14 for details

Comments

@MartinquaXD
Copy link
Contributor

Problem

When configuring an endpoint URL that contains query parameters (e.g. an API key) in the legacy config.toml file the requests will be made to a scrambled version of that URL.

Impact

This caused requests to the SeaSolver being sent to the wrong endpoint and effectively disabled it for a while as a solver.

To reproduce

playground example highlighting what's going wrong in our code

Expected behaviour

You should be able to configure an endpoint URL with query parameters and the requests should be made to that exact URL.

@MartinquaXD MartinquaXD added bug Something isn't working E:3.1 Driver Colocation See https://github.com/cowprotocol/pm/issues/14 for details labels Oct 18, 2023
MartinquaXD added a commit that referenced this issue Oct 19, 2023
# Description
Fixes #1988

# Changes
Added a helper function to split a URL into base and path which is used
for the `legacy` solver adapter.

## How to test
added a unit test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working E:3.1 Driver Colocation See https://github.com/cowprotocol/pm/issues/14 for details
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant