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
+15 -9
View File
@@ -1,16 +1,23 @@
<!DOCTYPE html> <!doctype html>
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover"> <meta
<meta http-equiv="Content-Security-Policy" name="viewport"
content="default-src 'self'; script-src 'self'; style-src 'self'; img-src 'self' data:; font-src 'self';"> content="width=device-width, initial-scale=1.0, viewport-fit=cover"
<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>
@@ -21,5 +28,4 @@
{% block scripts %}{% endblock %} {% block scripts %}{% endblock %}
</body> </body>
</html> </html>