Compare commits

...
5 changed files with 24 additions and 9 deletions
+1
View File
@@ -11,6 +11,7 @@
| 1.3.x | :white_check_mark: |
| 1.4.x | :white_check_mark: |
| 1.5.x | :white_check_mark: |
| 1.6.x | :white_check_mark: |
## Reporting a Vulnerability
+4
View File
@@ -412,6 +412,7 @@ august
sammy
cool
brian
brien
platinum
jake
bronco
@@ -1935,6 +1936,7 @@ panama
lucy
buffy
brianna
brienna
welcome1
vette
blue22
@@ -3053,6 +3055,7 @@ randall
abstr
napster
brian1
brien1
bogart
high
hitler
@@ -4123,6 +4126,7 @@ truman
cubbies
nitram
briana
briena
ebony
kings
warner
+4 -4
View File
@@ -609,9 +609,9 @@ App::get('/v1/cards/cloud')
$isPlatinum = $user->getInternalId() % 100 === 0;
} else {
$name = $mock === 'normal-long' ? 'Sir First Walter O\'Brian Junior' : 'Walter O\'Brian';
$name = $mock === 'normal-long' ? 'Sir First Walter O\'Brien Junior' : 'Walter O\'Brien';
$createdAt = new \DateTime('now');
$githubName = $mock === 'normal-no-github' ? '' : ($mock === 'normal-long' ? 'sir-first-walterobrian-junior' : 'walterobrian');
$githubName = $mock === 'normal-no-github' ? '' : ($mock === 'normal-long' ? 'sir-first-walterobrien-junior' : 'walterobrien');
$isHero = $mock === 'hero';
$isContributor = $mock === 'contributor';
$isEmployee = \str_starts_with($mock, 'employee');
@@ -900,9 +900,9 @@ App::get('/v1/cards/cloud-og')
} else {
$bgVariation = \str_ends_with($mock, '-bg2') ? '2' : (\str_ends_with($mock, '-bg3') ? '3' : '1');
$cardVariation = \str_ends_with($mock, '-right') ? '2' : (\str_ends_with($mock, '-middle') ? '3' : '1');
$name = \str_starts_with($mock, 'normal-long') ? 'Sir First Walter O\'Brian Junior' : 'Walter O\'Brian';
$name = \str_starts_with($mock, 'normal-long') ? 'Sir First Walter O\'Brien Junior' : 'Walter O\'Brien';
$createdAt = new \DateTime('now');
$githubName = $mock === 'normal-no-github' ? '' : (\str_starts_with($mock, 'normal-long') ? 'sir-first-walterobrian-junior' : 'walterobrian');
$githubName = $mock === 'normal-no-github' ? '' : (\str_starts_with($mock, 'normal-long') ? 'sir-first-walterobrien-junior' : 'walterobrien');
$isHero = \str_starts_with($mock, 'hero');
$isContributor = \str_starts_with($mock, 'contributor');
$isEmployee = \str_starts_with($mock, 'employee');
@@ -2,12 +2,15 @@
namespace Tests\E2E\Services\Account;
use Appwrite\Tests\Async;
use Tests\E2E\Client;
use Utopia\Database\Helpers\ID;
use Utopia\Database\Validator\Datetime as DatetimeValidator;
trait AccountBase
{
use Async;
public function testCreateAccount(): array
{
$email = uniqid() . 'user@localhost.test';
@@ -2339,7 +2339,6 @@ class AccountCustomClientTest extends Scope
/**
* @depends testUpdatePhone
*/
#[Retry(count: 3)]
public function testPhoneVerification(array $data): array
{
$session = $data['session'] ?? '';
@@ -2359,13 +2358,21 @@ class AccountCustomClientTest extends Scope
$this->assertEmpty($response['body']['secret']);
$this->assertTrue((new DatetimeValidator())->isValid($response['body']['expire']));
$smsRequest = $this->getLastRequest();
$token = null;
$this->assertEventually(function () use (&$token) {
$request = json_decode(file_get_contents('http://request-catcher:5000/__last_request__'), true);
$body = json_decode($request['data'], true);
$this->assertArrayHasKey('message', $body);
$token = substr($body['message'], 0, 6);
$this->assertNotEmpty($token);
}, 10000, 500);
$message = $smsRequest['data']['message'];
$token = substr($message, 0, 6);
return \array_merge($data, [
'token' => \substr($smsRequest['data']['message'], 0, 6)
'token' => $token
]);
}