-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Use Java mechanisms to read language files and default to UTF-8 #21755
Use Java mechanisms to read language files and default to UTF-8 #21755
Conversation
While this is still in draft, it already contains updates to all property files and the docs. |
Charset encoding = PropertiesUtil.detectEncoding(new FileInputStream(file)); | ||
try (Reader reader = new InputStreamReader(new FileInputStream(file), encoding)) { | ||
m.load(reader); | ||
try (InputStream stream = Files.newInputStream(file.toPath())) { |
Check failure
Code scanning / CodeQL
Uncontrolled data used in path expression High
user-provided value
This path depends on a
user-provided value
This path depends on a
user-provided value
This path depends on a
user-provided value
This path depends on a
user-provided value
This path depends on a
user-provided value
This path depends on a
user-provided value
This path depends on a
user-provided value
This path depends on a
user-provided value
This path depends on a
user-provided value
This path depends on a
user-provided value
This path depends on a
user-provided value
This path depends on a
user-provided value
This path depends on a
user-provided value
This path depends on a
user-provided value
This path depends on a
user-provided value
This path depends on a
user-provided value
This path depends on a
user-provided value
This path depends on a
user-provided value
This path depends on a
user-provided value
This path depends on a
user-provided value
This path depends on a
user-provided value
This path depends on a
user-provided value
This path depends on a
user-provided value
This path depends on a
user-provided value
This path depends on a
user-provided value
This path depends on a
user-provided value
This path depends on a
user-provided value
This path depends on a
user-provided value
This path depends on a
user-provided value
This path depends on a
user-provided value
This path depends on a
user-provided value
This path depends on a
user-provided value
This path depends on a
user-provided value
This path depends on a
user-provided value
This path depends on a
user-provided value
This path depends on a
user-provided value
This path depends on a
user-provided value
This path depends on a
user-provided value
This path depends on a
user-provided value
This path depends on a
user-provided value
This path depends on a
user-provided value
This path depends on a
user-provided value
This path depends on a
user-provided value
This path depends on a
user-provided value
This path depends on a
user-provided value
This path depends on a
user-provided value
This path depends on a
user-provided value
This path depends on a
user-provided value
This path depends on a
user-provided value
This path depends on a
user-provided value
This path depends on a
user-provided value
This path depends on a
user-provided value
This path depends on a
user-provided value
This path depends on a
user-provided value
This path depends on a
user-provided value
This path depends on a
user-provided value
This path depends on a
user-provided value
This path depends on a
user-provided value
This path depends on a
user-provided value
This path depends on a
user-provided value
It would be great to have a review from one of the maintainers on the Java side on this. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving for the Java part
@ahus1 looks like the code scanner has some issues with the changes introduced here. |
d8bfd8c
to
36c1c05
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unreported flaky test detected, please review
Unreported flaky test detectedIf the below flaky tests below are affected by the changes, please review and update the changes accordingly. Otherwise, a maintainer should report the flaky tests prior to merging the PR. org.keycloak.testsuite.forms.LoginTest#loginDifferentUserAfterDisabledUserThrownOutKeycloak CI - Forms IT (firefox)
|
1 similar comment
Unreported flaky test detectedIf the below flaky tests below are affected by the changes, please review and update the changes accordingly. Otherwise, a maintainer should report the flaky tests prior to merging the PR. org.keycloak.testsuite.forms.LoginTest#loginDifferentUserAfterDisabledUserThrownOutKeycloak CI - Forms IT (firefox)
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unreported flaky test detected, please review
36c1c05
to
471daad
Compare
@jonkoops - I've look at the CodeQL alert, and also added a Regex check for filenames - CodeQL still complains. The logic to create the filename didn't change in this PR, so I assume it is as safe as before. I'll follow up with Bruno to find out why CodeQL complains here. |
@ahus1 sounds good to me, should we go ahead and merge this then? |
@jonkoops - yes, I think this is the way to go. Please approve it for the UI part. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@hmlnarik - I've added one more commit to make CodeQL happy, but it continues to warn. I'd like to keep that change, and have it squashed when committing. I'll contact @abstractj separately to figure out how to make CodeQL happy. Could you please re-approve and merge? Thanks! |
471daad
to
e7c31c1
Compare
Rebased to resolve conflicts on the docs. Also squashed the two commits. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you for the PR @ahus1, I added two comments. Also, it seems a rebase is needed (sorry for the late review).
docs/documentation/upgrading/topics/keycloak/changes-23_0_0.adoc
Outdated
Show resolved
Hide resolved
e7c31c1
to
badab44
Compare
badab44
to
21eda42
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @ahus1
@jonkoops - could you please re-review before we run into another merge conflict? Thank you very much! |
Closes #21753
Discussion: #9270