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

Detect client timezone in browser doesn't fire with OAUTH2 authorization and oauth_login_redirect = true #9747

Open
2 tasks done
dutty5 opened this issue Jan 9, 2025 · 4 comments

Comments

@dutty5
Copy link

dutty5 commented Jan 9, 2025

Prerequisites

  • I have searched for duplicate or closed issues
  • I can recreate the issue with all plugins disabled

Describe the issue

Hi,

Client's timezone in the browsers is not auto detected (and the fallback to the server timezone occurs) in case oauth2 authorization is configured with the setting oauth_login_redirect set to true.

The reason is probably due to the fact that currently the auto detection of the timezone occurs in the login form:

case 'login':

In case of oauth authorization set and with the oauth auto redirection configured the login form is bypassed.

What browser(s) are you seeing the problem on?

Chrome, Edge, Firefox, Safari

What version of PHP are you using?

v8.3

What version of Roundcube are you using?

v1.6.9

JavaScript errors

No response

PHP errors

No response

@alecpl
Copy link
Member

alecpl commented Jan 9, 2025

Same as #9738, but let's keep it open as it describes a different use-case.

@dutty5
Copy link
Author

dutty5 commented Jan 9, 2025

The problem leads to the incorrect and unexpected message(s) time display for the most users (who have the timezone set to Auto, which is the default).

As OIDC authorization becomes more common, I would say this is an issue worth looking into.

Thanks

@alecpl
Copy link
Member

alecpl commented Jan 9, 2025

OIDC defines zoneinfo claim for this. So, we should support it. It may not be supported by all servers, so we'll need a general solution too.

@dutty5
Copy link
Author

dutty5 commented Jan 9, 2025

My current workaround is to set the server's php variable date.timezone explicitly to the value that matches the timezone of the most users. OIDC use case likely means it is deployed for organizations with a substantial user base, so this issue may have a significant impact on such deployments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants