Localization feature problem for non-English browsers
See original GitHub issueHi, We’ve upgraded to version 2.4.4720.0005 and ran into a problem with the localization feature https://github.com/neos-sdi/adfsmfa/wiki/09-Localization. We also upgraded to 2.4.4720.0011 and it has the same problem.
The localization works good with the default browser/OS language set to English. When we have another language set we get different results. (We only have English resource files for the localization, so other languages should default back to the English resource files.)
It sometimes works, and it defaults back to the English customized text we have. But sometimes it does not, and the browser then ends up in a loop after typing username and password not moving forward to the MFA “Enter Code” page.
It seems like this happens when the browser sets the html language attribute to something that is not in this list https://github.com/neos-sdi/adfsmfa/commit/f3bd6c5246bcd5c78dcc1f0c2632fb56de905822
For example, my Google Chrome sets lang=sv
, and then the MFA works, while my Edge browser sets lang=sv-SE
and then I end up in the loop and are not prompted for MFA. We also got the same problem in Google Chrome when the browser sets lang=nl-NL
.
When this problem occur we get this error log in the ADFS event log.
Encountered error during federation passive request.
Additional Data
Protocol Name: Saml
Relying Party: rp.domain.com
Exception details: System.Resources.MissingManifestResourceException: Could not find any resources appropriate for the specified culture (or the neutral culture) on disk. baseName: Neos.IdentityServer.MultiFactor.Resources.STitle locationInfo: <null> fileName: Neos.IdentityServer.MultiFactor.Resources.STitle.resources at System.Resources.FileBasedResourceGroveler.GrovelForResourceSet(CultureInfo culture, Dictionary`2 localResourceSets, Boolean tryParents, Boolean createIfNotExists, StackCrawlMark& stackMark) at System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo requestedCulture, Boolean createIfNotExists, Boolean tryParents, StackCrawlMark& stackMark) at System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo culture, Boolean createIfNotExists, Boolean tryParents) at System.Resources.ResourceManager.GetString(String name, CultureInfo culture) at Neos.IdentityServer.MultiFactor.ResourcesLocale.GetString(ResourcesLocaleKind kind, String name) at Neos.IdentityServer.MultiFactor.BasePresentation.GetPageTitle(Int32 lcid) at Neos.IdentityServer.MultiFactor.AdapterPresentation.GetPageTitle(Int32 lcid) at Microsoft.IdentityServer.Web.UI.CustomAuthenticationPage.get_PageTitle() at Microsoft.IdentityServer.Web.UI.PageBase.ApplyTheme(String template) at Microsoft.IdentityServer.Web.UI.PageBase.GetPageHtml() at Microsoft.IdentityServer.Web.UI.PageBase.Render() at Microsoft.IdentityServer.Web.Authentication.External.ExternalAuthenticationHandler.Process(ProtocolContext context) at Microsoft.IdentityServer.Web.Authentication.AuthenticationOptionsHandler.Process(ProtocolContext context) at Microsoft.IdentityServer.Web.PassiveProtocolListener.OnGetContext(WrappedHttpListenerContext context)
When we remove the customized localize resource files the default text works from any html language attribute.
Could this be a bug?
Kind regards, Andreas
Issue Analytics
- State:
- Created 4 years ago
- Comments:19 (10 by maintainers)
Top GitHub Comments
Hi,
If it works, keep it.
If am surprised that only with resources en-US it does not work (without en only). It should be tested by removing the “en” version, to see if the default applies to all languages.
I confirm that we will remove the version en only in future versions, while allowing the versions en-US.
Regards
Thanks