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 timezone not only on a logon form #9738

Open
2 tasks done
sootsnoot opened this issue Dec 27, 2024 · 8 comments
Open
2 tasks done

Detect timezone not only on a logon form #9738

sootsnoot opened this issue Dec 27, 2024 · 8 comments

Comments

@sootsnoot
Copy link

Prerequisites

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

Describe the issue

Using purelymail.com webmail, which uses roundcube 1.6.8. Messages in the inbox are shown with times that appear to be GMT. I'm running Windows 10 with Chrome 131.0.6778.205. If I go to https://webbrowsertools.com/timezone/ I see
Time on Local Machine | Fri Dec 27 2024 12:03:41 GMT-0500 (Eastern Standard Time)
which is correct, while messages sent at that time show 17:03

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

Chrome, Firefox

What version of PHP are you using?

No response

What version of Roundcube are you using?

1.6.8

JavaScript errors

No response

PHP errors

No response

@alecpl
Copy link
Member

alecpl commented Jan 1, 2025

In master we removed use of jstz detector and now we're using the straight browser API. So, if that is a timezone detection issue it probably will be fixed this way. Reference: #8965.

Are you able to verify the content of the POST request sent when you log into Roundcube? It should include the detected _timezone. That would tell us whether this is in fact a timezone detection issue or something else.

@sootsnoot
Copy link
Author

I'm using roundcube 1.6.8, hosted by purelymail.com. And according to #8965, the removal of jstz has a milestone of 1.7-beta. When I use Chrome devtools to record network interactions and login to inbox.purelymail.com, I see this POST request:

Request URL:
https://inbox.purelymail.com/?_task=login&_mbox=INBOX
Request Method:
POST
Status Code:
302 Found
Remote Address:
3.221.185.110:443
Referrer Policy:
strict-origin-when-cross-origin

With a payload of:

_task: login
_mbox: INBOX
_task: login
_action: login
_autologin: true
_user: [email protected]
_pass: PURELYMAILPASS|PUnxrFqECUyHnKBIC/SYeyZ1OW44EnVglfxiIX213MduxOi+0Wfg/NR5jS194Jx0mTxF8yLpvPK7hR43E6CgcQ==|6MU1WObOZ4Wue/qF2lzsoouJ2BteDItIZxjKFvAmI/f1je2ph8oCixyhbqVULL6v58ZPUvhP/g8B14Zsj0HXcA==

Where should I see the detected _timezone if this worked correctly?
BTW, I just set the timezone back to _auto_, sent another test email, and sure enough the message is displayed with GMT date,

I don't own the purelymail hosting, but is there some way I could test roundcube 1.7-beta to see if it fixes this problem?

@alecpl
Copy link
Member

alecpl commented Jan 1, 2025

This page uses a custom (external) logon page that bypasses Roundcube logon page. So, I suspect the timezone detection is not being done at all, as normally it would be done on Roundcube logon page.

inbox.purelymail.com will have to detect the timezone and pass it to Roundcube as _timezone POST parameter. Or we'll have to consider detecting the timezone later if not specified yet.

@sootsnoot
Copy link
Author

I have forwarded your reply (and a link to this conversation) to purelymail.com support. IMHO, as a web developer myself, having the roundcube logon page include the browser's timezone in a POST parameter seems very strange. If the code that displays the logon page can determine the timezone, then the code that processes the POST parameters could just as easily determine the timezone without relying on a POST parameter for it. Relying on a POST parameter to supply the timezone seems kinda weird/awkward/unreliable.

@alecpl
Copy link
Member

alecpl commented Jan 2, 2025

Browsers do not sent timezone identifiers in headers or nothing like that. So, it need to be "detected" using javascript and passed to server side. Nothing strange here.

@sootsnoot
Copy link
Author

sootsnoot commented Jan 2, 2025 via email

@sootsnoot
Copy link
Author

sootsnoot commented Jan 2, 2025 via email

@ScottPeterJohnson
Copy link

It's not a problem to add this to our login page, I just didn't realize this was how it worked.

@alecpl alecpl changed the title Auto timezone not working correctly in 1.6.8 on Windows 10 Chrome Detect timezone not only on a logon form Jan 9, 2025
@alecpl alecpl added this to the later milestone Jan 9, 2025
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

3 participants