Skip to content

API: Make BasicAuth Prefix case insensitive #14106

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

Merged
merged 7 commits into from
Dec 23, 2020

Conversation

6543
Copy link
Member

@6543 6543 commented Dec 22, 2020

Before:

  • curl -X POST "http://gitea.com/api/v1/... -H "accept: application/json" -H "authorization: Basic dTE6MTIzMTIz" ...
  • curl -X POST "http://gitea.com/api/v1/... -H "accept: application/json" -H "Authorization: Basic dTE6MTIzMTIz" ...

After:

  • curl -X POST "http://gitea.com/api/v1/... -H "accept: application/json" -H "authorization: Basic dTE6MTIzMTIz" ...
  • curl -X POST "http://gitea.com/api/v1/... -H "accept: application/json" -H "authorization: basic dTE6MTIzMTIz" ...
  • curl -X POST "http://gitea.com/api/v1/... -H "accept: application/json" -H "Authorization: basic dTE6MTIzMTIz" ...
  • curl -X POST "http://gitea.com/api/v1/... -H "accept: application/json" -H "Authorization: Basic dTE6MTIzMTIz" ...

@6543 6543 added type/enhancement An improvement of existing functionality modifies/api This PR adds API routes or modifies them labels Dec 22, 2020
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Dec 22, 2020
@6543 6543 added this to the 1.14.0 milestone Dec 22, 2020
@codecov-io
Copy link

codecov-io commented Dec 22, 2020

Codecov Report

Merging #14106 (912022a) into master (e0c753e) will decrease coverage by 0.02%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #14106      +/-   ##
==========================================
- Coverage   42.37%   42.35%   -0.03%     
==========================================
  Files         726      726              
  Lines       77839    77839              
==========================================
- Hits        32982    32966      -16     
- Misses      39447    39459      +12     
- Partials     5410     5414       +4     
Impacted Files Coverage Δ
modules/auth/sso/basic.go 51.06% <100.00%> (ø)
modules/charset/charset.go 68.53% <0.00%> (-4.50%) ⬇️
modules/queue/manager.go 62.13% <0.00%> (-2.96%) ⬇️
models/unit.go 46.57% <0.00%> (-2.74%) ⬇️
modules/process/manager.go 72.50% <0.00%> (-2.50%) ⬇️
services/pull/check.go 48.90% <0.00%> (-0.73%) ⬇️
routers/api/v1/repo/pull.go 24.84% <0.00%> (-0.61%) ⬇️
services/pull/pull.go 42.35% <0.00%> (-0.51%) ⬇️
modules/util/timer.go 85.71% <0.00%> (+42.85%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e0c753e...912022a. Read the comment docs.

@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Dec 22, 2020
Copy link
Member

@lafriks lafriks left a comment

Choose a reason for hiding this comment

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

@6543 6543 changed the title API: Make BasicAuth Header & Prefix case insensitive API: Make BasicAuth Prefix case insensitive Dec 22, 2020
@6543 6543 requested a review from lafriks December 22, 2020 16:02
@6543
Copy link
Member Author

6543 commented Dec 22, 2020

@lafriks done

@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Dec 23, 2020
@6543
Copy link
Member Author

6543 commented Dec 23, 2020

🚀

@6543 6543 merged commit 5b95831 into go-gitea:master Dec 23, 2020
@6543 6543 deleted the api_case-insensitive-BasicAuth branch December 23, 2020 19:52
@go-gitea go-gitea locked and limited conversation to collaborators Feb 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. modifies/api This PR adds API routes or modifies them type/enhancement An improvement of existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants