-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/develop' into feature/3573_autoc…
…heck_article_uploaded
- Loading branch information
Showing
37 changed files
with
779 additions
and
432 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../ambassadors/Popova-1.jpeg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../ambassadors/ina-smith.png |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../ambassadors/max.png |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1 @@ | ||
# ~~PublisherSupporters:Data~~ | ||
- name: Faculty of Communication, Universitas Tarumanagara | ||
url: https://fikom.untar.ac.id/ | ||
|
||
- name: Gruppo Italiano Frattura | ||
url: http://www.gruppofrattura.it/sito/en/ | ||
|
||
- name: INCAS - National Institute for Aerospace Research “Elie Carafoli”, INCAS Bucuresti | ||
url: https://www.gruppofrattura.it/sito/en/ | ||
|
||
- name: Italian Society of Victimology | ||
url: https://www.vittimologia.it/rivista | ||
|
||
- name: Scandinavian University Press (Universitetsforlaget AS) | ||
url: https://www.universitetsforlaget.no/ | ||
|
||
- name: Scientia Agropecuaria | ||
url: https://revistas.unitru.edu.pe/index.php/scientiaagrop | ||
|
||
- name: Tsinghua University Press | ||
url: https://www.tsinghua.edu.cn/en/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
from doajtest.helpers import DoajTestCase | ||
from urllib.parse import quote_plus, urlparse | ||
|
||
|
||
class TestCookieConsent(DoajTestCase): | ||
|
||
def test_01_cookie_consent_permitted_domains(self): | ||
""" Ensure we only redirect to our own domain via cookie consent """ | ||
|
||
with self.app_test.test_client() as t_client: | ||
# Ensure only relative redirects are permitted | ||
empty_redirect = t_client.get('/cookie_consent') | ||
assert empty_redirect.status_code == 200 | ||
|
||
permitted_redirect = t_client.get('/cookie_consent?continue=%2Farticle%2Fuuid') | ||
assert permitted_redirect.status_code == 302 | ||
assert permitted_redirect.location == '/article/uuid' | ||
|
||
permitted_redirect_params = t_client.get('/cookie_consent?continue=' + quote_plus('/apply?errors=numerous')) | ||
assert permitted_redirect_params.status_code == 302 | ||
assert permitted_redirect_params.location == '/apply?errors=numerous' | ||
|
||
def test_02_cookie_consent_invalid_domains(self): | ||
""" Any redirect to another domain is rejected via cookie consent """ | ||
|
||
with self.app_test.test_client() as t_client: | ||
invalid_redirect = t_client.get( | ||
'/cookie_consent?continue=https%3A%2F%2Fa_nasty_phishing_site.com%2Femailform%3Fdeeds%3Devil') | ||
assert invalid_redirect.status_code == 400 | ||
|
||
# The best we can do - a redirect that looks like a path should try to serve from our domain, fail with 404 | ||
invalid_redirect_no_scheme = t_client.get( | ||
'/cookie_consent?continue=a_nasty_phishing_site.com%2Femailform%3Fdeeds%3Devil') | ||
assert invalid_redirect_no_scheme.status_code == 302 | ||
assert not invalid_redirect_no_scheme.location.startswith('http') | ||
assert urlparse(invalid_redirect_no_scheme.location).path == 'a_nasty_phishing_site.com/emailform' | ||
assert urlparse(invalid_redirect_no_scheme.location).netloc == '' | ||
|
||
invalid_redirect_ip = t_client.get( | ||
'/cookie_consent?continue=1.2.3.4%2Femailform%3Fdeeds%3Devil') | ||
assert invalid_redirect_ip.status_code == 302 | ||
assert not invalid_redirect_ip.location.startswith('http') | ||
assert urlparse(invalid_redirect_ip.location).path == '1.2.3.4/emailform' | ||
assert urlparse(invalid_redirect_ip.location).netloc == '' |
Oops, something went wrong.