Fixdd additonal issues identified by Davidson CI

This commit is contained in:
2026-09-09 21:02:31 +01:00
parent 0a64c09066
commit 59a89667f7
7 changed files with 160 additions and 36 deletions
+21
View File
@@ -1,6 +1,27 @@
<?php
function send_app_csp_header(): void
{
if (headers_sent()) {
return;
}
header('Content-Security-Policy: ' . implode(' ', [
"script-src 'self' 'unsafe-inline' https://unpkg.com https://cdn.paddle.com;",
"style-src 'self' 'unsafe-inline' https://fonts.googleapis.com;",
"font-src https://fonts.gstatic.com;",
"img-src 'self' data:;",
"connect-src 'self' https://cdn.paddle.com https://api.paddle.com https://sandbox-api.paddle.com;",
"frame-src https://buy.paddle.com https://sandbox-buy.paddle.com;",
"object-src 'none';",
"base-uri 'self';",
"frame-ancestors 'none';",
]), true, 0);
}
function start_app_session(): void
{
send_app_csp_header();
if (session_status() === PHP_SESSION_ACTIVE) {
return;
}