This commit is contained in:
Adrià Casajús 2022-03-29 21:03:55 +02:00
parent 77faff5f7c
commit 1555bc6346
No known key found for this signature in database
GPG key ID: F0033226A5AFC9B9
3 changed files with 3 additions and 6 deletions

View file

@ -70,7 +70,7 @@ def authorize():
client = Client.get_by(oauth_client_id=oauth_client_id)
if not client:
redirect(url_for("auth.login"))
return redirect(url_for("auth.login"))
# check if redirect_uri is valid
# allow localhost by default

View file

@ -1,5 +1,5 @@
[pytest]
addopts =
xaddopts =
--cov
--cov-config coverage.ini
--cov-report=html:htmlcov

View file

@ -643,10 +643,7 @@ def test_authorize_page_invalid_client_id(flask_client):
)
assert r.status_code == 302
assert (
r.location
== "http://localhost?error=invalid_client_id&client_id=invalid_client_id"
)
assert r.location == url_for("auth.login")
def test_authorize_page_http_not_allowed(flask_client):