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

Use safe URL joins for API calls and better status code checks #262

Closed
evanshortiss opened this issue May 24, 2021 · 2 comments
Closed

Use safe URL joins for API calls and better status code checks #262

evanshortiss opened this issue May 24, 2021 · 2 comments

Comments

@evanshortiss
Copy link
Contributor

In openshift-rest-client.js the getUserFromAuthToken can fail if the given settings.url has a trailing slash.

For example if settings.url is https://$CLUSTER_HOST:6443/, then the resulting URL becomes https://$CLUSTER_HOST:6443//apis/user.openshift.io/v1/users/~. Notice the double slash? This causes a 404.

I'm happy to submit a PR shortly that safely joins the URL 😄

@lholmquist
Copy link
Member

that would be great 👍

@lholmquist
Copy link
Member

closed via #265

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants