fix: [server endpoint] unknow users: avoid endpoint enumeration

pull/359/head
Terrtia 2019-06-20 10:11:23 +02:00
parent ef716f22e5
commit e4ab9b6a05
No known key found for this signature in database
GPG Key ID: 1E1B1F50D84613D0
2 changed files with 47 additions and 0 deletions

View File

@ -224,6 +224,13 @@ def role():
def searchbox():
return render_template("searchbox.html")
# ========== ERROR HANDLER ============
@app.errorhandler(404)
@login_required
def page_not_found(e):
# note that we set the 404 status explicitly
return render_template('error/404.html'), 404
# ========== INITIAL taxonomies ============
# add default ail taxonomies

View File

@ -0,0 +1,40 @@
<!DOCTYPE html>
<html>
<head>
<title>403 - AIL</title>
<link rel="icon" href="{{ url_for('static', filename='image/ail-icon.png') }}">
<!-- Core CSS -->
<link href="{{ url_for('static', filename='css/bootstrap4.min.css') }}" rel="stylesheet">
</head>
<body>
{% include 'nav_bar.html' %}
<div>
<br>
<br>
<h1 class="text-center">404 Not Found</h1>
</div>
<br>
<br>
<br>
<br>
<div class="d-flex justify-content-center">
<pre>
,d8 ,a8888a, ,d8
,d888 ,8P"' `"Y8, ,d888
,d8" 88 ,8P Y8, ,d8" 88
,d8" 88 88 88 ,d8" 88
,d8" 88 88 88 ,d8" 88
8888888888888 `8b d8' 8888888888888
88 `8ba, ,ad8' 88
88 "Y8888P" 88
</pre>
</div>
<body>
</html>