Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[SecurityBundle] Set translator in AccessTokenAuthenticator in Security bundle config#54734

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation

@dwgebler
Copy link

QA
Branch?6.4
Bug fix?yes
New feature?no
Deprecations?no
Issues
LicenseMIT

TheAccessTokenAuthenticator doesn't get configured with thetranslator service. This appears to be a bug, as this class'ssetTranslator is unused and the translator can't be injected anywhere else.

smnandre reacted with thumbs up emoji
@smnandre
Copy link
Member

It has been removed as a fix:#50819

@dwgebler
Copy link
Author

It has been removed as a fix:#50819

I have amended this branch to an alternative solution; we try to translate, but revert the translation if the result contains any non-ASCII characters. I don't think the linked fix is the right one, really - it's just making it impossible to do any translation here at all, even if the result would be valid and RFC compliant.

@wouterj
Copy link
Member

wouterj commentedJun 9, 2024
edited
Loading

What is the use-case for translating this message if - according to the RFC 6750 - it must not be displayed to the end user?

Also, this means we'll have deprecated translation strings in the repository (like Spanish as mentioned in#50811). I'm not sure how we are supposed to fix this, given you probably have to use non-ANCII characters in those languages.
This message is also used by other authenticators where the message is meant to be shown to users (like login form), so compromising the translations to fit only one specific authenticator also doesn't seem like a great option to me.

I'm still leaning towards not using the translator here for these arguments.

smnandre reacted with thumbs up emoji

@dwgebler
Copy link
Author

What is the use-case for translating this message if - according to the RFC 6750 - it must not be displayed to the end user?

"Not displayed to users" isn't quite the same thing as "never seen by a human"; easy to imagine the reasons for authentication failures supplied in headers may end up in logs and as such the information may aid with various inquiry and analysis. It's also not necessarily the case that every system respects the RFC, as not every access token system is OAuth2 compliant, so we don't know this message won't be displayed.

Also, this means we'll have deprecated translation strings in the repository (like Spanish as mentioned in#50811). I'm not sure how we are supposed to fix this, given you probably have to use non-ANCII characters in those languages. This message is also used by other authenticators where the message is meant to be shown to users (like login form), so compromising the translations to fit only one specific authenticator also doesn't seem like a great option to me.

I would argue that allowingsome translation, even if limited to ASCII characters, is useful. The case for translation may not necessarily be to another language, but e.g. alternative or simplified English for example.

@fabpot
Copy link
Member

Closing as explained by the other core team members.

@fabpotfabpot closed thisMar 29, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@fabpotfabpotfabpot left review comments

@nicolas-grekasnicolas-grekasnicolas-grekas left review comments

@OskarStarkOskarStarkOskarStark left review comments

@chalasrchalasrAwaiting requested review from chalasrchalasr is a code owner

Assignees

No one assigned

Projects

None yet

Milestone

6.4

Development

Successfully merging this pull request may close these issues.

7 participants

@dwgebler@smnandre@wouterj@fabpot@nicolas-grekas@OskarStark@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp