Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stop using Source Sans Pro intermittently for some pages #1128

Merged
merged 1 commit into from
Dec 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions login.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

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

if (!file_exists('config.php')) {
header("Location: setup.php");
Expand Down Expand Up @@ -316,8 +316,7 @@

<!-- Theme style -->
<link rel="stylesheet" href="dist/css/adminlte.min.css">
<!-- Google Font: Source Sans Pro -->
<link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700" rel="stylesheet">

</head>
<body class="hold-transition login-page">

Expand Down
2 changes: 1 addition & 1 deletion portal/certificates.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Certificate listing for PTC / technical contacts
*/

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

require_once "inc_portal.php";

Expand Down
2 changes: 1 addition & 1 deletion portal/contact_add.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Contact management for PTC / technical contacts
*/

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

require_once "inc_portal.php";

Expand Down
2 changes: 1 addition & 1 deletion portal/contact_edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Contact management for PTC / technical contacts
*/

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

require_once "inc_portal.php";

Expand Down
2 changes: 1 addition & 1 deletion portal/contacts.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Contact management for PTC / technical contacts
*/

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

require_once "inc_portal.php";

Expand Down
2 changes: 1 addition & 1 deletion portal/document.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Docs for PTC / technical contacts
*/

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

require_once "inc_portal.php";

Expand Down
2 changes: 1 addition & 1 deletion portal/documents.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Docs for PTC / technical contacts
*/

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

require_once "inc_portal.php";

Expand Down
2 changes: 1 addition & 1 deletion portal/domains.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Domain listing for PTC / technical contacts
*/

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

require_once "inc_portal.php";

Expand Down
2 changes: 1 addition & 1 deletion portal/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Landing / Home page for the client portal
*/

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

require_once "inc_portal.php";

Expand Down
2 changes: 1 addition & 1 deletion portal/invoices.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Invoices for PTC
*/

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

require_once "inc_portal.php";

Expand Down
22 changes: 10 additions & 12 deletions portal/login.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Landing / Home page for the client portal
*/

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

require_once '../config.php';

Expand Down Expand Up @@ -50,13 +50,13 @@
$password = $_POST['password'];

if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {

header("HTTP/1.1 401 Unauthorized");

$_SESSION['login_message'] = 'Invalid e-mail';

} else {

$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");
$row = mysqli_fetch_array($sql);
$client_id = intval($row['contact_client_id']);
Expand All @@ -82,7 +82,7 @@
logAction("Client Login", "Success", "Client contact $user_email successfully logged in locally", $client_id, $user_id);

} else {

// Logging
logAction("Client Login", "Failed", "Failed client portal login attempt using $email (incorrect password for contact ID $contact_id)", $client_id, $user_id);

Expand All @@ -92,14 +92,14 @@
}

} else {

// Logging
logAction("Client Login", "Failed", "Failed client portal login attempt using $email (invalid email/not allowed local auth)");

header("HTTP/1.1 401 Unauthorized");

$_SESSION['login_message'] = 'Incorrect username or password.';

}
}
}
Expand Down Expand Up @@ -127,8 +127,6 @@
<!-- Theme style -->
<link rel="stylesheet" href="../dist/css/adminlte.min.css">

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

<body class="hold-transition login-page">
Expand Down
4 changes: 1 addition & 3 deletions portal/login_reset.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Password reset page
*/

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

require_once '../config.php';
require_once '../functions.php';
Expand Down Expand Up @@ -195,8 +195,6 @@
<!-- Theme style -->
<link rel="stylesheet" href="../dist/css/adminlte.min.css">

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

<body class="hold-transition login-page">
Expand Down
2 changes: 0 additions & 2 deletions portal/portal_header.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@
<!-- Theme style -->
<link rel="stylesheet" href="../dist/css/adminlte.min.css">

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

<!-- Navbar -->
Expand Down
2 changes: 1 addition & 1 deletion portal/profile.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* User profile
*/

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

require_once 'inc_portal.php';

Expand Down
2 changes: 1 addition & 1 deletion portal/quotes.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Quotes for PTC / billing contacts
*/

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

require_once "inc_portal.php";

Expand Down
2 changes: 1 addition & 1 deletion portal/tickets.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Landing / Home page for the client portal
*/

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

require_once "inc_portal.php";

Expand Down
Loading