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

Fix for malformed can-i URL (#2719) #3960

Merged
merged 1 commit into from
Dec 15, 2021
Merged

Conversation

castelblanque
Copy link
Collaborator

Signed-off-by: Rafa Castelblanque rcastelblanq@vmware.com

Description of the change

This PR prevents FE from placing can-i requests with malformed URLs that otherwise end up in 404 or 405 HTTP errors.
Thought that it was more correct formally not placing the requests instead of returning 200 OK with body authorized: no. Reason being that the URL was incorrect, and not the parameters.

Benefits

Less useless requests from browser to backend for can-i checks.

Possible drawbacks

N/A

Applicable issues

Additional information

Signed-off-by: Rafa Castelblanque <rcastelblanq@vmware.com>
@castelblanque castelblanque changed the title Malformed can-i URL (#2719) Fix for malformed can-i URL (#2719) Dec 15, 2021
Copy link
Contributor

@antgamdia antgamdia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thanks for the fix! We are about to move this endpoint to the new resources API, but we better fix it anyway.

@castelblanque castelblanque merged commit 415e150 into master Dec 15, 2021
@castelblanque castelblanque deleted the 2719-malformed-cani branch December 15, 2021 11:29
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

Successfully merging this pull request may close these issues.

Malformed can-i URL on non-kubeapps cluster
2 participants