{"action":"created","issue":{"url":"https://api.github.com/repos/magento/magento2/issues/6852","repository_url":"https://api.github.com/repos/magento/magento2","labels_url":"https://api.github.com/repos/magento/magento2/issues/6852/labels{/name}","comments_url":"https://api.github.com/repos/magento/magento2/issues/6852/comments","events_url":"https://api.github.com/repos/magento/magento2/issues/6852/events","html_url":"https://github.com/magento/magento2/issues/6852","id":180601589,"number":6852,"title":"Password creation/reset link not working on certain timezones","user":{"login":"AlexandreKhayrullin","id":22170715,"avatar_url":"https://avatars.githubusercontent.com/u/22170715?v=3","gravatar_id":"","url":"https://api.github.com/users/AlexandreKhayrullin","html_url":"https://github.com/AlexandreKhayrullin","followers_url":"https://api.github.com/users/AlexandreKhayrullin/followers","following_url":"https://api.github.com/users/AlexandreKhayrullin/following{/other_user}","gists_url":"https://api.github.com/users/AlexandreKhayrullin/gists{/gist_id}","starred_url":"https://api.github.com/users/AlexandreKhayrullin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlexandreKhayrullin/subscriptions","organizations_url":"https://api.github.com/users/AlexandreKhayrullin/orgs","repos_url":"https://api.github.com/users/AlexandreKhayrullin/repos","events_url":"https://api.github.com/users/AlexandreKhayrullin/events{/privacy}","received_events_url":"https://api.github.com/users/AlexandreKhayrullin/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/magento/magento2/labels/bug%20report","name":"bug report","color":"d93f0b"},{"url":"https://api.github.com/repos/magento/magento2/labels/Customer","name":"Customer","color":"1d76db"},{"url":"https://api.github.com/repos/magento/magento2/labels/develop","name":"develop","color":"fbca04"},{"url":"https://api.github.com/repos/magento/magento2/labels/needs%20update","name":"needs update","color":"b60205"}],"state":"open","locked":false,"assignee":{"login":"sevos1984","id":9819661,"avatar_url":"https://avatars.githubusercontent.com/u/9819661?v=3","gravatar_id":"","url":"https://api.github.com/users/sevos1984","html_url":"https://github.com/sevos1984","followers_url":"https://api.github.com/users/sevos1984/followers","following_url":"https://api.github.com/users/sevos1984/following{/other_user}","gists_url":"https://api.github.com/users/sevos1984/gists{/gist_id}","starred_url":"https://api.github.com/users/sevos1984/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sevos1984/subscriptions","organizations_url":"https://api.github.com/users/sevos1984/orgs","repos_url":"https://api.github.com/users/sevos1984/repos","events_url":"https://api.github.com/users/sevos1984/events{/privacy}","received_events_url":"https://api.github.com/users/sevos1984/received_events","type":"User","site_admin":false},"assignees":[{"login":"sevos1984","id":9819661,"avatar_url":"https://avatars.githubusercontent.com/u/9819661?v=3","gravatar_id":"","url":"https://api.github.com/users/sevos1984","html_url":"https://github.com/sevos1984","followers_url":"https://api.github.com/users/sevos1984/followers","following_url":"https://api.github.com/users/sevos1984/following{/other_user}","gists_url":"https://api.github.com/users/sevos1984/gists{/gist_id}","starred_url":"https://api.github.com/users/sevos1984/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sevos1984/subscriptions","organizations_url":"https://api.github.com/users/sevos1984/orgs","repos_url":"https://api.github.com/users/sevos1984/repos","events_url":"https://api.github.com/users/sevos1984/events{/privacy}","received_events_url":"https://api.github.com/users/sevos1984/received_events","type":"User","site_admin":false}],"milestone":null,"comments":4,"created_at":"2016-10-03T09:53:10Z","updated_at":"2016-10-24T08:14:47Z","closed_at":null,"body":"### Preconditions\r\n1. Set the timezone to America/Santiago.\r\n\r\n### Steps to reproduce\r\n1. Create a new customer or update an existing one in the backend. An e-mail will be sent.\r\n2. In the received e-mail, click on the link for creating or resetting a password.\r\n\r\n### Expected result\r\n1. The user is redirected to the form where they can enter their new password.\r\n\r\n### Actual result\r\n1. A session message pops-up, saying that the link has expired.\r\n\r\nHere is a more detailed description of the issue and the proposed solution:\r\n\r\nAfter receiving an e-mail sent after a password change request and clicking on the button \"Set a New Password\", depending on the timezone set on the store, the link can be always marked as \"expired\". This is the case, for instance, for stores set in Chili (timezone: \"America/Santiago\") .\r\n\r\nThe problem resides in the method \\Magento\\Customer\\Model\\AccountManagement::isResetPasswordLinkTokenExpired() , where the method reads the token timestamp, that has been stored in UTC on creation, and considers it to be in the store's timezone.\r\n\r\nTo solve the issue, replace this line in the method:\r\n\r\n$tokenTimestamp = (new \\DateTime($rpTokenCreatedAt))->getTimestamp();\r\n\r\nwith this one:\r\n\r\n$tokenTimestamp = (new \\DateTime($rpTokenCreatedAt,new \\DateTimeZone('UTC')))->getTimestamp();\r\n"},"comment":{"url":"https://api.github.com/repos/magento/magento2/issues/comments/255675963","html_url":"https://github.com/magento/magento2/issues/6852#issuecomment-255675963","issue_url":"https://api.github.com/repos/magento/magento2/issues/6852","id":255675963,"user":{"login":"AlexandreKhayrullin","id":22170715,"avatar_url":"https://avatars.githubusercontent.com/u/22170715?v=3","gravatar_id":"","url":"https://api.github.com/users/AlexandreKhayrullin","html_url":"https://github.com/AlexandreKhayrullin","followers_url":"https://api.github.com/users/AlexandreKhayrullin/followers","following_url":"https://api.github.com/users/AlexandreKhayrullin/following{/other_user}","gists_url":"https://api.github.com/users/AlexandreKhayrullin/gists{/gist_id}","starred_url":"https://api.github.com/users/AlexandreKhayrullin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlexandreKhayrullin/subscriptions","organizations_url":"https://api.github.com/users/AlexandreKhayrullin/orgs","repos_url":"https://api.github.com/users/AlexandreKhayrullin/repos","events_url":"https://api.github.com/users/AlexandreKhayrullin/events{/privacy}","received_events_url":"https://api.github.com/users/AlexandreKhayrullin/received_events","type":"User","site_admin":false},"created_at":"2016-10-24T08:14:47Z","updated_at":"2016-10-24T08:14:47Z","body":"The server's timezone is \"CEST\" (UTC+0200). The frontend's timezone is \"America/Santiago\" (UTC-0400) , defined on the website scope. The backend, on the other hand, uses the default timezone (no special configuration in the core_config_data table) .\r\n"}}
{"actor":{"display_login":"AlexandreKhayrullin"}}