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

update csrf key generation #21154

Merged
merged 3 commits into from
Nov 15, 2024
Merged

update csrf key generation #21154

merged 3 commits into from
Nov 15, 2024

Conversation

wy65701436
Copy link
Contributor

@wy65701436 wy65701436 commented Nov 8, 2024

Fixes #21060

Do not generate a random key if the provided key has an invalid length.

Thank you for contributing to Harbor!

Comprehensive Summary of your change

Issue being fixed

Fixes #(issue)

Please indicate you've done the following:

  • Well Written Title and Summary of the PR
  • Label the PR as needed. "release-note/ignore-for-release, release-note/new-feature, release-note/update, release-note/enhancement, release-note/community, release-note/breaking-change, release-note/docs, release-note/infra, release-note/deprecation"
  • Accepted the DCO. Commits without the DCO will delay acceptance.
  • Made sure tests are passing and test coverage is added if needed.
  • Considered the docs impact and opened a new docs issue or PR with docs changes if needed in website repository.

Copy link

codecov bot commented Nov 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 66.09%. Comparing base (c8c11b4) to head (3c85241).
Report is 329 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##             main   #21154       +/-   ##
===========================================
+ Coverage   45.36%   66.09%   +20.72%     
===========================================
  Files         244     1049      +805     
  Lines       13333   114654   +101321     
  Branches     2719     2867      +148     
===========================================
+ Hits         6049    75775    +69726     
- Misses       6983    34736    +27753     
- Partials      301     4143     +3842     
Flag Coverage Δ
unittests 66.09% <100.00%> (+20.72%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/server/middleware/csrf/csrf.go 86.00% <100.00%> (ø)

... and 1287 files with indirect coverage changes

@reasonerjt
Copy link
Contributor

We should make document this as a break change.

Copy link
Contributor

@MinerYang MinerYang left a comment

Choose a reason for hiding this comment

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

lgtm

@wy65701436 wy65701436 added release-note/breaking-change Breaking changes in the release and removed release-note/update Update or Fix kind/break-change labels Nov 8, 2024
Fixes goharbor#21060

Do not generate a random key if the provided key has an invalid length.

Signed-off-by: wang yan <[email protected]>
Signed-off-by: wang yan <[email protected]>
@wy65701436 wy65701436 merged commit 9345fe3 into goharbor:main Nov 15, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note/breaking-change Breaking changes in the release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Harbor not properly sharing CSRF tokens/sessions across scaled deployment in k8s
5 participants