04/26 Fixed HIBP issue

This commit is contained in:
2026-04-26 15:20:52 -04:00
parent 86888d7b25
commit f2bc51e1c6
2 changed files with 28 additions and 22 deletions
+1 -1
View File
@@ -59,7 +59,7 @@ def create_app(config_name: str = 'development') -> Flask:
"style-src 'self'; " "style-src 'self'; "
"img-src 'self' data:; " "img-src 'self' data:; "
"font-src 'self'; " "font-src 'self'; "
"connect-src 'self'; " "connect-src 'self' https://api.pwnedpasswords.com; "
"frame-ancestors 'none';" "frame-ancestors 'none';"
) )
return response return response
+19 -13
View File
@@ -1,25 +1,31 @@
<!DOCTYPE html> <!doctype html>
<html lang="en"> <html lang="en">
<head>
<head> <meta charset="UTF-8" />
<meta charset="UTF-8"> <meta
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover"> name="viewport"
<meta http-equiv="Content-Security-Policy" content="width=device-width, initial-scale=1.0, viewport-fit=cover"
content="default-src 'self'; script-src 'self'; style-src 'self'; img-src 'self' data:; font-src 'self';"> />
<meta name="csrf-token" content="{{ csrf_token() }}"> <meta
http-equiv="Content-Security-Policy"
content="default-src 'self'; script-src 'self'; style-src 'self'; img-src 'self' data:; font-src 'self'; connect-src 'self' https://api.pwnedpasswords.com; frame-ancestors 'none';"
/>
<meta name="csrf-token" content="{{ csrf_token() }}" />
<title>{% block title %}PassKeeper{% endblock %}</title> <title>{% block title %}PassKeeper{% endblock %}</title>
<!-- layout-init.js MUST be synchronous (no defer/async) so it runs before body renders --> <!-- layout-init.js MUST be synchronous (no defer/async) so it runs before body renders -->
<script src="{{ url_for('static', filename='js/layout-init.js') }}?v={{ sv }}"></script> <script src="{{ url_for('static', filename='js/layout-init.js') }}?v={{ sv }}"></script>
<link rel="stylesheet" href="{{ url_for('static', filename='css/app.css') }}?v={{ sv }}"> <link
rel="stylesheet"
href="{{ url_for('static', filename='css/app.css') }}?v={{ sv }}"
/>
{% block head_extra %}{% endblock %} {% block head_extra %}{% endblock %}
</head> </head>
<body class="{% block body_class %}{% endblock %}"> <body class="{% block body_class %}{% endblock %}">
{% block body %}{% endblock %} {% block body %}{% endblock %}
<div id="toast" class="toast" aria-live="polite"></div> <div id="toast" class="toast" aria-live="polite"></div>
{% block scripts %}{% endblock %} {% block scripts %}{% endblock %}
</body> </body>
</html> </html>