spring-projects / spring-projects/spring-security

spring-security-config:6.4.3+dubbo3.3.3

Open
#17,786 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

status: waiting-for-triage type: bug
Dominant language
Java
Stars
9.6k
Forks
6.3k
Avg merge
2d 11h
Merged PRs (30d)
52

Description

When I use the TRI protocol, the content set by RpcContext.getClientAttachment ().setAttachment contains Chinese characters. When the RpcContext.getServerAttachment ().getAttachment method retrieves this content, the content will be garbled.
So ContextHolderAuthenticationPrepareFilter in setSecurityContext did not take this factor into account, so ContextHolderAuthenticationResolverFilter get SecurityNames.SECURITY_AUTHENTICATION_CONTEXT_KEY, which contains Chinese values become garbled
翻译反

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with ContextHolderAuthenticationPrepareFilter.setSecurityContext and ContextHolderAuthenticationResolverFilter, then trace how SecurityNames.SECURITY_AUTHENTICATION_CONTEXT_KEY crosses RpcContext client and server attachments under the TRI protocol. Reproduce the case with Chinese attachment values and verify that the authentication context is preserved without garbling.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring
Domain
authentication, backend, security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.