8000 Fix 4982 email session expire string formattz by munyoudoum · Pull Request #4985 · appwrite/appwrite · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix 4982 email session expire string formattz #4985

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

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Version TBD
- Fix expire to formatTz in create account session [#4985](https://github.com/appwrite/appwrite/pull/4985)
- Fix not storing function's response on response codes 5xx [#4610](https://github.com/appwrite/appwrite/pull/4610)

# Version 1.2.1
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/api/account.php
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@

$detector = new Detector($request->getUserAgent('UNKNOWN'));
$record = $geodb->get($request->getIP());
$expire = DateTime::addSeconds(new \DateTime(), $duration);
$expire = DateTime::formatTz(DateTime::addSeconds(new \DateTime(), $duration));
$secret = Auth::tokenGenerator();
$session = new Document(array_merge(
[
Expand Down
2 changes: 2 additions & 0 deletions tests/e2e/Services/Account/AccountBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ public function testCreateAccountSession($data): array
]);

$this->assertEquals($response['headers']['status-code'], 201);
$this->assertNotFalse(\DateTime::createFromFormat('Y-m-d\TH:i:s.uP', $response['body']['expire']));

$sessionId = $response['body']['$id'];
$session = $this->client->parseCookie((string)$response['headers']['set-cookie'])['a_session_' . $this->getProject()['$id']];
Expand All @@ -135,6 +136,7 @@ public function testCreateAccountSession($data): array
]);

$this->assertEquals($response['headers']['status-code'], 201);
$this->assertNotFalse(\DateTime::createFromFormat('Y-m-d\TH:i:s.uP', $response['body']['expire']));

/**
* Test for FAILURE
Expand Down
0