Skip to content

SEC-2744: BasicAuthenticationFilter decodes the Passwords with UTF-8 #2969

@spring-projects-issues

Description

@spring-projects-issues

Rob Winch (Migrated from SEC-2744) said:

All browser encode the Password in BasicAuthentification in ISO-8859-1.

See: Stackoverflow Discussion http://stackoverflow.com/questions/7242316/what-encoding-should-i-use-for-http-basic-authentication

The BasisAuthentificationFilter explicitly decodes using UTF-8.

This broke Authentification with Umlauts in the password (example: passwordöäü) for me.

Further Analysis:
Chrome encodes the AuthentificationInfo with UTF-8
Firefox and IE use ISO8859-1

private String[] extractAndDecodeHeader(String header, HttpServletRequest request) throws IOException {

byte[] base64Token = header.substring(6).getBytes("UTF-8");

Metadata

Metadata

Assignees

Labels

in: webAn issue in web modules (web, webmvc)status: declinedA suggestion or change that we don't feel we should currently applytype: jiraAn issue that was migrated from JIRA

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions