mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2025-12-15 04:37:17 +00:00
preventing _edit_edit_edit* loops by bots
This commit is contained in:
@@ -79,6 +79,8 @@ class FixturePageTests(TestCase):
|
||||
"""
|
||||
|
||||
# The fixtures have a password hash which is compatible with plain-text password 'secretword'
|
||||
# The hash CHANGES whenever Django upgrades the encryption key length. Better to create the test uses
|
||||
# algorithmically and not via a fixture.
|
||||
fixtures = ["auth_users", "expo_caves", "expo_exped"]
|
||||
ph = r"and leads in 800m of tortuous going to"
|
||||
|
||||
|
||||
@@ -57,7 +57,9 @@ def expofiles_redirect(request, filepath):
|
||||
return redirect(urljoin("http://expo.survex.com/expofiles/", filepath))
|
||||
|
||||
def spider(request, _):
|
||||
return redirect("/?#") # so that suffixes applied by spider are no longer part of the url
|
||||
# urls ending in "_edit_edit"
|
||||
return render(request, "pagenotfound.html", {"path": path}, status=404)
|
||||
# return redirect("/?#") # so that suffixes applied by spider are no longer part of the url
|
||||
|
||||
def map(request):
|
||||
"""Serves unadorned the expoweb/map/slippy/map.html file"""
|
||||
|
||||
Reference in New Issue
Block a user