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

Switch Basic Authentication encoding to UTF-8 #1970

Merged
merged 1 commit into from
Nov 16, 2023
Merged

Conversation

ppkarwasz
Copy link
Contributor

RFC 7617 introduces a new charset parameter for the Basic authentication scheme with a single allowed value "UTF-8".

Clients that comply to this RFC should encode the user name and password using UTF-8 if the parameter is present. Clients that always use UTF-8 obviously comply to this rule.

Up until now Log4j used the system encoding for Basic authentication. This PR:

  • switches the default encoding to UTF-8,
  • adds a log4j2.configurationAuthorizationEncoding property to overwrite the default value.

This problem was detected by Error Prone in #1961.

@vy vy merged commit 819b738 into apache:2.x Nov 16, 2023
9 checks passed
@ppkarwasz ppkarwasz deleted the basic-auth branch November 16, 2023 15:21
dongjoon-hyun pushed a commit to apache/spark that referenced this pull request Nov 22, 2023
### What changes were proposed in this pull request?
The pr aims to upgrade log4j2 from 2.21.0 to 2.22.0.

### Why are the changes needed?
This is the first log4j2 version that provides a CycloneDX Software Bill of Materials (SBOM) and the new version bring some new change and fix like:
- Change the order of evaluation of FormattedMessage formatters. Messages are evaluated using java.util.Format only if they don't comply to the java.text.MessageFormat or ParameterizedMessage format. (apache/logging-log4j2#1223)
- Change default encoding of HTTP Basic Authentication to UTF-8 and add log4j2.configurationAuthorizationEncoding property to overwrite it. (apache/logging-log4j2#1970)
- Removed unused FastDateParser which was causing unnecessary heap overhead ([LOG4J2-3672](https://issues.apache.org/jira/browse/LOG4J2-3672), apache/logging-log4j2#1848)
- Fix MDC pattern converter causing issues for %notEmpty (apache/logging-log4j2#1922)
- Fix NotSerializableException thrown when Logger is serialized with a ReusableMessageFactory (apache/logging-log4j2#1884)

the full release note as follows:
-https://github.com/apache/logging-log4j2/releases/tag/rel%2F2.22.0

### Does this PR introduce _any_ user-facing change?
No

### How was this patch tested?
Pass GitHub Actions

### Was this patch authored or co-authored using generative AI tooling?
No

Closes #43940 from LuciferYang/SPARK-46038.

Authored-by: yangjie01 <yangjie01@baidu.com>
Signed-off-by: Dongjoon Hyun <dhyun@apple.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants