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 the problem of username being case-insensitive and logging in without permissions #4552

Merged
merged 2 commits into from
Sep 7, 2023

Conversation

JohnNiang
Copy link
Member

@JohnNiang JohnNiang commented Sep 5, 2023

What type of PR is this?

/kind bug
/area core
/milestone 2.10.x

What this PR does / why we need it:

This PR fixes the problem of username being case-insensitive and logging in without permissions. Please note that the problem only occurs with MySQL.

Which issue(s) this PR fixes:

Fixes #4549

Special notes for your reviewer:

docker run -it --rm --name halodb -p 3306:3306 -e MYSQL_ROOT_PASSWORD=openmysql -e MYSQL_DATABASE=halo mysql:8

./gradlew bootRun --args="--spring.profiles.active=dev,mysql --halo.plugin.runtime-mode=deployment"

Does this PR introduce a user-facing change?

修复因大小写问题导致登录后无权限的问题

@f2c-ci-robot f2c-ci-robot bot added the kind/bug Categorizes issue or PR as related to a bug. label Sep 5, 2023
@f2c-ci-robot f2c-ci-robot bot added this to the 2.10.x milestone Sep 5, 2023
@f2c-ci-robot f2c-ci-robot bot added area/core Issues or PRs related to the Halo Core do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Sep 5, 2023
@f2c-ci-robot f2c-ci-robot bot requested review from LIlGG and minliacom September 5, 2023 06:51
@f2c-ci-robot f2c-ci-robot bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Sep 5, 2023
@codecov
Copy link

codecov bot commented Sep 5, 2023

Codecov Report

Merging #4552 (71fa8af) into main (eea575c) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##               main    #4552   +/-   ##
=========================================
  Coverage     61.02%   61.02%           
  Complexity     2560     2560           
=========================================
  Files           373      373           
  Lines         13149    13150    +1     
  Branches        937      937           
=========================================
+ Hits           8024     8025    +1     
  Misses         4670     4670           
  Partials        455      455           
Files Changed Coverage Δ
...un/halo/app/security/DefaultUserDetailService.java 100.00% <100.00%> (ø)

@JohnNiang
Copy link
Member Author

/cherrypick release-2.9

@halo-dev-bot
Copy link
Collaborator

@JohnNiang: once the present PR merges, I will cherry-pick it on top of release-2.9 in a new PR and assign it to you.

In response to this:

/cherrypick release-2.9

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Copy link
Member

@ruibaby ruibaby left a comment

Choose a reason for hiding this comment

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

/lgtm

@f2c-ci-robot f2c-ci-robot bot added the lgtm Indicates that a PR is ready to be merged. label Sep 7, 2023
Copy link
Member

@guqing guqing left a comment

Choose a reason for hiding this comment

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

/approve

@f2c-ci-robot
Copy link

f2c-ci-robot bot commented Sep 7, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: guqing

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@f2c-ci-robot f2c-ci-robot bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 7, 2023
@f2c-ci-robot f2c-ci-robot bot merged commit 9c3e603 into halo-dev:main Sep 7, 2023
2 checks passed
@halo-dev-bot
Copy link
Collaborator

@JohnNiang: new pull request created: #4570

In response to this:

/cherrypick release-2.9

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@JohnNiang JohnNiang deleted the bug/case-insensitive-username branch September 7, 2023 06:27
f2c-ci-robot bot pushed a commit that referenced this pull request Sep 7, 2023
…logging in without permissions (#4570)

This is an automated cherry-pick of #4552

/assign JohnNiang

```release-note
修复因大小写问题导致登录后无权限的问题
```
@ruibaby ruibaby modified the milestones: 2.10.x, 2.10.0 Sep 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/core Issues or PRs related to the Halo Core kind/bug Categorizes issue or PR as related to a bug. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

运行一段时间后提示无权限访问
4 participants