mirror of
https://github.com/ail-project/ail-framework.git
synced 2024-11-10 08:38:28 +00:00
fix: [server endpoint] unknow users: avoid endpoint enumeration
This commit is contained in:
parent
ef716f22e5
commit
e4ab9b6a05
2 changed files with 47 additions and 0 deletions
|
@ -224,6 +224,13 @@ def role():
|
||||||
def searchbox():
|
def searchbox():
|
||||||
return render_template("searchbox.html")
|
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 ============
|
# ========== INITIAL taxonomies ============
|
||||||
# add default ail taxonomies
|
# add default ail taxonomies
|
||||||
|
|
40
var/www/templates/error/404.html
Normal file
40
var/www/templates/error/404.html
Normal 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>
|
Loading…
Reference in a new issue