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

Replace dynamic error message with static "Access Denied" #16528

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

kwondh5217
Copy link
Contributor

Motivation

  • HttpStatusServerAccessDeniedHandler previously returned the exception message,
    which could expose sensitive information.
  • This PR ensures that the handler always returns a static "Access Denied" message.

Modification

  • Updated HttpStatusServerAccessDeniedHandler to return a static message.
  • Updated tests to verify the response body.

Result

Closes gh-16514

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Feb 3, 2025
@sjohnr sjohnr self-assigned this Feb 3, 2025
@sjohnr sjohnr added in: web An issue in web modules (web, webmvc) type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged labels Feb 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web An issue in web modules (web, webmvc) type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Send a static message from HttpStatusServerAccessDeniedHandler
3 participants