Skip to content

Commit c78d0a1

Browse files
authoredDec 28, 2024··
Merge pull request #1128 from itflow-org/font-tidy
Stop using Source Sans Pro intermittently for some pages
2 parents 343365d + fcfc6ff commit c78d0a1

16 files changed

+25
-32
lines changed
 

‎login.php

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
// Enforce a Content Security Policy for security against cross-site scripting
4-
header("Content-Security-Policy: default-src 'self' fonts.googleapis.com fonts.gstatic.com");
4+
header("Content-Security-Policy: default-src 'self'");
55

66
if (!file_exists('config.php')) {
77
header("Location: setup.php");
@@ -316,8 +316,7 @@
316316

317317
<!-- Theme style -->
318318
<link rel="stylesheet" href="dist/css/adminlte.min.css">
319-
<!-- Google Font: Source Sans Pro -->
320-
<link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700" rel="stylesheet">
319+
321320
</head>
322321
<body class="hold-transition login-page">
323322

‎portal/certificates.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* Certificate listing for PTC / technical contacts
55
*/
66

7-
header("Content-Security-Policy: default-src 'self' fonts.googleapis.com fonts.gstatic.com");
7+
header("Content-Security-Policy: default-src 'self'");
88

99
require_once "inc_portal.php";
1010

‎portal/contact_add.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* Contact management for PTC / technical contacts
55
*/
66

7-
header("Content-Security-Policy: default-src 'self' fonts.googleapis.com fonts.gstatic.com");
7+
header("Content-Security-Policy: default-src 'self'");
88

99
require_once "inc_portal.php";
1010

‎portal/contact_edit.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* Contact management for PTC / technical contacts
55
*/
66

7-
header("Content-Security-Policy: default-src 'self' fonts.googleapis.com fonts.gstatic.com");
7+
header("Content-Security-Policy: default-src 'self'");
88

99
require_once "inc_portal.php";
1010

‎portal/contacts.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* Contact management for PTC / technical contacts
55
*/
66

7-
header("Content-Security-Policy: default-src 'self' fonts.googleapis.com fonts.gstatic.com");
7+
header("Content-Security-Policy: default-src 'self'");
88

99
require_once "inc_portal.php";
1010

‎portal/document.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* Docs for PTC / technical contacts
55
*/
66

7-
header("Content-Security-Policy: default-src 'self' fonts.googleapis.com fonts.gstatic.com; img-src 'self' data:");
7+
header("Content-Security-Policy: default-src 'self'; img-src 'self' data:");
88

99
require_once "inc_portal.php";
1010

‎portal/documents.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* Docs for PTC / technical contacts
55
*/
66

7-
header("Content-Security-Policy: default-src 'self' fonts.googleapis.com fonts.gstatic.com");
7+
header("Content-Security-Policy: default-src 'self'");
88

99
require_once "inc_portal.php";
1010

‎portal/domains.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* Domain listing for PTC / technical contacts
55
*/
66

7-
header("Content-Security-Policy: default-src 'self' fonts.googleapis.com fonts.gstatic.com");
7+
header("Content-Security-Policy: default-src 'self'");
88

99
require_once "inc_portal.php";
1010

‎portal/index.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* Landing / Home page for the client portal
55
*/
66

7-
header("Content-Security-Policy: default-src 'self' fonts.googleapis.com fonts.gstatic.com");
7+
header("Content-Security-Policy: default-src 'self'");
88

99
require_once "inc_portal.php";
1010

‎portal/invoices.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* Invoices for PTC
55
*/
66

7-
header("Content-Security-Policy: default-src 'self' fonts.googleapis.com fonts.gstatic.com");
7+
header("Content-Security-Policy: default-src 'self'");
88

99
require_once "inc_portal.php";
1010

‎portal/login.php

+10-12
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* Landing / Home page for the client portal
55
*/
66

7-
header("Content-Security-Policy: default-src 'self' fonts.googleapis.com fonts.gstatic.com");
7+
header("Content-Security-Policy: default-src 'self'");
88

99
require_once '../config.php';
1010

@@ -50,13 +50,13 @@
5050
$password = $_POST['password'];
5151

5252
if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
53-
53+
5454
header("HTTP/1.1 401 Unauthorized");
55-
55+
5656
$_SESSION['login_message'] = 'Invalid e-mail';
57-
57+
5858
} else {
59-
59+
6060
$sql = mysqli_query($mysqli, "SELECT * FROM users LEFT JOIN contacts ON user_id = contact_user_id WHERE user_email = '$email' AND user_archived_at IS NULL AND user_type = 2 AND user_status = 1 LIMIT 1");
6161
$row = mysqli_fetch_array($sql);
6262
$client_id = intval($row['contact_client_id']);
@@ -82,7 +82,7 @@
8282
logAction("Client Login", "Success", "Client contact $user_email successfully logged in locally", $client_id, $user_id);
8383

8484
} else {
85-
85+
8686
// Logging
8787
logAction("Client Login", "Failed", "Failed client portal login attempt using $email (incorrect password for contact ID $contact_id)", $client_id, $user_id);
8888

@@ -92,14 +92,14 @@
9292
}
9393

9494
} else {
95-
95+
9696
// Logging
9797
logAction("Client Login", "Failed", "Failed client portal login attempt using $email (invalid email/not allowed local auth)");
98-
98+
9999
header("HTTP/1.1 401 Unauthorized");
100-
100+
101101
$_SESSION['login_message'] = 'Incorrect username or password.';
102-
102+
103103
}
104104
}
105105
}
@@ -127,8 +127,6 @@
127127
<!-- Theme style -->
128128
<link rel="stylesheet" href="../dist/css/adminlte.min.css">
129129

130-
<!-- Google Font: Source Sans Pro -->
131-
<link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700" rel="stylesheet">
132130
</head>
133131

134132
<body class="hold-transition login-page">

‎portal/login_reset.php

+1-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* Password reset page
55
*/
66

7-
header("Content-Security-Policy: default-src 'self' fonts.googleapis.com fonts.gstatic.com");
7+
header("Content-Security-Policy: default-src 'self'");
88

99
require_once '../config.php';
1010
require_once '../functions.php';
@@ -195,8 +195,6 @@
195195
<!-- Theme style -->
196196
<link rel="stylesheet" href="../dist/css/adminlte.min.css">
197197

198-
<!-- Google Font: Source Sans Pro -->
199-
<link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700" rel="stylesheet">
200198
</head>
201199

202200
<body class="hold-transition login-page">

‎portal/portal_header.php

-2
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@
2929
<!-- Theme style -->
3030
<link rel="stylesheet" href="../dist/css/adminlte.min.css">
3131

32-
<!-- Google Font: Source Sans Pro -->
33-
<link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700" rel="stylesheet">
3432
</head>
3533

3634
<!-- Navbar -->

‎portal/profile.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* User profile
55
*/
66

7-
header("Content-Security-Policy: default-src 'self' fonts.googleapis.com fonts.gstatic.com");
7+
header("Content-Security-Policy: default-src 'self'");
88

99
require_once 'inc_portal.php';
1010

‎portal/quotes.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* Quotes for PTC / billing contacts
55
*/
66

7-
header("Content-Security-Policy: default-src 'self' fonts.googleapis.com fonts.gstatic.com");
7+
header("Content-Security-Policy: default-src 'self'");
88

99
require_once "inc_portal.php";
1010

‎portal/tickets.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* Landing / Home page for the client portal
55
*/
66

7-
header("Content-Security-Policy: default-src 'self' fonts.googleapis.com fonts.gstatic.com");
7+
header("Content-Security-Policy: default-src 'self'");
88

99
require_once "inc_portal.php";
1010

0 commit comments

Comments
 (0)
Please sign in to comment.