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

Prevent "bearer" capitalization mistakes by using the bearer_auth function #86

Merged
merged 1 commit into from
Sep 29, 2023

Conversation

cole-h
Copy link
Member

@cole-h cole-h commented Sep 28, 2023

bearer is actually not spec conformant: https://datatracker.ietf.org/doc/html/rfc6750#section-2.1

@@ -650,11 +642,6 @@ async fn push_new_release(
let flakehub_headers = {
let mut header_map = HeaderMap::new();

header_map.insert(
reqwest::header::AUTHORIZATION,
reqwest::header::HeaderValue::from_str(&format!("bearer {}", upload_bearer_token))
Copy link
Member Author

Choose a reason for hiding this comment

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

This is the potentially-problematic one. Pretty sure I introduced this, oops.

@cole-h cole-h marked this pull request as draft September 28, 2023 21:20
Copy link
Member

@grahamc grahamc left a comment

Choose a reason for hiding this comment

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

🐻

@cole-h cole-h marked this pull request as ready for review September 29, 2023 16:14
@cole-h cole-h merged commit e013a09 into main Sep 29, 2023
9 checks passed
@cole-h cole-h deleted the fixup-bearer branch September 29, 2023 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants