diff options
| -rw-r--r-- | CHANGELOG.rst | 1 | ||||
| -rw-r--r-- | ihatemoney/tests/tests.py | 6 | ||||
| -rw-r--r-- | ihatemoney/web.py | 2 |
3 files changed, 8 insertions, 1 deletions
diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 81993f3..382e889 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -13,6 +13,7 @@ Fixed - Fix broken install with pip ≥ 10 (#340) - Fix the generation of the supervisord template (#309) - Fix the validation of the hashed password (#310) +- Fix infinite loop that happened when accessing / (#358) Added ===== diff --git a/ihatemoney/tests/tests.py b/ihatemoney/tests/tests.py index 3797f09..fd72a8d 100644 --- a/ihatemoney/tests/tests.py +++ b/ihatemoney/tests/tests.py @@ -1434,6 +1434,12 @@ class APITestCase(IhatemoneyTestCase): class ServerTestCase(IhatemoneyTestCase): + def test_homepage(self): + # See https://github.com/spiral-project/ihatemoney/pull/358 + self.app.config['APPLICATION_ROOT'] = '/' + req = self.client.get("/") + self.assertStatus(200, req) + def test_unprefixed(self): self.app.config['APPLICATION_ROOT'] = '/' req = self.client.get("/foo/") diff --git a/ihatemoney/web.py b/ihatemoney/web.py index 1e16202..6e876c0 100644 --- a/ihatemoney/web.py +++ b/ihatemoney/web.py @@ -198,7 +198,7 @@ def authenticate(project_id=None): return render_template("authenticate.html", form=form) -@main.route("/") +@main.route("/", strict_slashes=False) def home(): project_form = ProjectForm() auth_form = AuthenticationForm() |
