From 4f8489879879d84add4c47ad01c1c6559c4c19ff Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Tue, 28 Jan 2020 20:54:26 +0200 Subject: [PATCH 1/9] Updated badges --- README.md | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index aab784002..aff7220af 100644 --- a/README.md +++ b/README.md @@ -7,14 +7,12 @@

-[![Docker Pulls](https://img.shields.io/docker/pulls/appwrite/appwrite.svg)](https://hub.docker.com/r/appwrite/appwrite) + [![Discord](https://img.shields.io/discord/564160730845151244)](https://discord.gg/GSeTUeA) -[![Build Status](https://travis-ci.org/appwrite/appwrite.svg?branch=master)](https://travis-ci.org/appwrite/appwrite) -[![GitHub stars](https://img.shields.io/github/stars/appwrite/appwrite.svg)](https://github.com/appwrite/appwrite/stargazers) -[![Follow Appwrite on StackShare](https://img.stackshare.io/misc/follow-on-stackshare-badge.svg)](https://stackshare.io/appwrite) -[![Follow new releases](https://app.releasly.co/assets/badges/badge-blue.svg)](https://app.releasly.co/sites/appwrite/appwrite?utm_source=github_badge) -[![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause) -[![Twitter Follow](https://img.shields.io/twitter/follow/appwrite_io?style=social)](https://twitter.com/appwrite_io) +[![Docker Pulls](https://badgen.net/docker/pulls/appwrite/appwrite)](https://travis-ci.org/appwrite/appwrite) +[![Travis CI](https://badgen.net/travis/appwrite/appwrite?label=build)](https://travis-ci.org/appwrite/appwrite) +[![Twitter Account](https://badgen.net/twitter/follow/appwrite_io?label=twitter)](https://twitter.com/appwrite_io) +[![Follow Appwrite on StackShare](https://badgen.net/badge/follow%20on/stackshare/blue)](https://stackshare.io/appwrite) --- From 268e60118c8bf455fe5926137acf66852d74cb90 Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Wed, 29 Jan 2020 12:46:28 +0200 Subject: [PATCH 2/9] Allow empty origin for non-web platform --- app/app.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/app.php b/app/app.php index 9eb799f27..d12b62cab 100644 --- a/app/app.php +++ b/app/app.php @@ -86,7 +86,7 @@ $utopia->init(function () use ($utopia, $request, $response, &$user, $project, $ $hostValidator = new Host($clients); $origin = $request->getServer('HTTP_ORIGIN', $request->getServer('HTTP_REFERER', '')); - if (!$hostValidator->isValid($origin) + if (!empty($origin) && !$hostValidator->isValid($origin) && in_array($request->getMethod(), [Request::METHOD_POST, Request::METHOD_PUT, Request::METHOD_PATCH, Request::METHOD_DELETE]) && empty($request->getHeader('X-Appwrite-Key', ''))) { throw new Exception('Access from this client host is forbidden. '.$hostValidator->getDescription(), 403); From e243d5ef71814edecc2034a179b8d37478857841 Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Wed, 29 Jan 2020 12:49:18 +0200 Subject: [PATCH 3/9] Updated docs --- app/app.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/app.php b/app/app.php index d12b62cab..90eb4a848 100644 --- a/app/app.php +++ b/app/app.php @@ -82,6 +82,7 @@ $utopia->init(function () use ($utopia, $request, $response, &$user, $project, $ /* * Validate Client Domain - Check to avoid CSRF attack * Adding Appwrite API domains to allow XDOMAIN communication + * Skip this check for non-web platforms which are not requiredto send an origin header */ $hostValidator = new Host($clients); $origin = $request->getServer('HTTP_ORIGIN', $request->getServer('HTTP_REFERER', '')); From b59028a4e6b5815f484a78881a5c06f7bc3bafab Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Sun, 2 Feb 2020 22:09:16 +0200 Subject: [PATCH 4/9] Updated README --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index aff7220af..3bd72f33b 100644 --- a/README.md +++ b/README.md @@ -14,8 +14,6 @@ [![Twitter Account](https://badgen.net/twitter/follow/appwrite_io?label=twitter)](https://twitter.com/appwrite_io) [![Follow Appwrite on StackShare](https://badgen.net/badge/follow%20on/stackshare/blue)](https://stackshare.io/appwrite) ---- - Appwrite is a simple self-hosted backend server for web and mobile developers with a shiny dashboard and a very easy-to-use REST API. Appwrite API services aim to make developer's life a lot easier by hiding the complexity of common and repetitive software development tasks. From 7f99c4958230736912d4b7d9f6d7fd34d7d29d27 Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Sun, 2 Feb 2020 22:11:52 +0200 Subject: [PATCH 5/9] Updated README --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 3bd72f33b..faeeaaf51 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,7 @@ [![Twitter Account](https://badgen.net/twitter/follow/appwrite_io?label=twitter)](https://twitter.com/appwrite_io) [![Follow Appwrite on StackShare](https://badgen.net/badge/follow%20on/stackshare/blue)](https://stackshare.io/appwrite) + Appwrite is a simple self-hosted backend server for web and mobile developers with a shiny dashboard and a very easy-to-use REST API. Appwrite API services aim to make developer's life a lot easier by hiding the complexity of common and repetitive software development tasks. From c60c3a7fec174e1aa6db16d0b69bf57cd6a4c443 Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Sun, 2 Feb 2020 22:14:18 +0200 Subject: [PATCH 6/9] Updated README --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index faeeaaf51..3bd72f33b 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,6 @@ [![Twitter Account](https://badgen.net/twitter/follow/appwrite_io?label=twitter)](https://twitter.com/appwrite_io) [![Follow Appwrite on StackShare](https://badgen.net/badge/follow%20on/stackshare/blue)](https://stackshare.io/appwrite) - Appwrite is a simple self-hosted backend server for web and mobile developers with a shiny dashboard and a very easy-to-use REST API. Appwrite API services aim to make developer's life a lot easier by hiding the complexity of common and repetitive software development tasks. From 230ddf3d838c198e2c755f73540c4f9e44eebdbe Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Sun, 2 Feb 2020 22:32:14 +0200 Subject: [PATCH 7/9] Updated README --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 3bd72f33b..faeeaaf51 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,7 @@ [![Twitter Account](https://badgen.net/twitter/follow/appwrite_io?label=twitter)](https://twitter.com/appwrite_io) [![Follow Appwrite on StackShare](https://badgen.net/badge/follow%20on/stackshare/blue)](https://stackshare.io/appwrite) + Appwrite is a simple self-hosted backend server for web and mobile developers with a shiny dashboard and a very easy-to-use REST API. Appwrite API services aim to make developer's life a lot easier by hiding the complexity of common and repetitive software development tasks. From de10f725e6764e2f936a55d249b3613224883b00 Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Sun, 2 Feb 2020 23:03:16 +0200 Subject: [PATCH 8/9] Updated tests --- tests/e2e/ProjectLocaleTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/e2e/ProjectLocaleTest.php b/tests/e2e/ProjectLocaleTest.php index 97dd215d9..18fb51689 100644 --- a/tests/e2e/ProjectLocaleTest.php +++ b/tests/e2e/ProjectLocaleTest.php @@ -75,7 +75,7 @@ class ProjectLocaleTest extends BaseProjects $this->assertEquals($countries['headers']['status-code'], 200); $this->assertIsArray($countries['body']); - $this->assertCount(28, $countries['body']); + $this->assertCount(27, $countries['body']); $this->assertEquals($countries['body']['DE'], 'Germany'); // Test locale code change to ES From 4066c653838356f2c70d3d7a70eee22c79a4307f Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Mon, 3 Feb 2020 11:53:59 +0200 Subject: [PATCH 9/9] Updated locale test --- tests/e2e/ProjectLocaleTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/e2e/ProjectLocaleTest.php b/tests/e2e/ProjectLocaleTest.php index 18fb51689..bd4dfb08f 100644 --- a/tests/e2e/ProjectLocaleTest.php +++ b/tests/e2e/ProjectLocaleTest.php @@ -88,7 +88,7 @@ class ProjectLocaleTest extends BaseProjects $this->assertEquals($countries['headers']['status-code'], 200); $this->assertIsArray($countries['body']); - $this->assertCount(28, $countries['body']); + $this->assertCount(27, $countries['body']); $this->assertEquals($countries['body']['DE'], 'Alemania'); return $data;