Skip to content
This repository was archived by the owner on Jun 25, 2024. It is now read-only.

Commit bcba487

Browse files
author
Billy Clark
committed
Incorporated PR feedback
1 parent f69173e commit bcba487

5 files changed

Lines changed: 18 additions & 17 deletions

File tree

docker-compose.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ services:
1919
ADMIN_EMAIL: "admin@example.org"
2020
SECRET_SALT: "FcJwl0zCDc4nuzOuQL9/7WPIj3hdfusGm2ny0dcRQm0="
2121
IDP_NAME: "The Hub"
22+
ANALYTICS_ID: "UA-XXXX-Y"
2223
idp1:
2324
image: silintl/ssp-base:develop
2425
volumes:

themes/material/common-announcement.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?php
2-
$announcement = htmlentities($this->data['announcement']);
2+
$announcement = htmlentities($this->data['announcement'] ?? null);
33

44
if (! empty($announcement)) {
55
?>

themes/material/core/loginuserpass.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<?php include __DIR__ . '/../common-head-elements.php' ?>
77

88
<?php
9-
$siteKey = htmlentities($this->data['recaptcha.siteKey']);
9+
$siteKey = htmlentities($this->data['recaptcha.siteKey'] ?? null);
1010
if (! empty($siteKey)) {
1111
?>
1212
<script src='https://www.google.com/recaptcha/api.js?onload=onRecaptchaLoad&render=explicit'
@@ -40,9 +40,9 @@ function onRecaptchaLoad() {
4040

4141
<form method="POST" action="<?= htmlentities($_SERVER['PHP_SELF']) ?>">
4242
<input type="hidden" name="AuthState"
43-
value="<?= htmlentities($this->data['stateparams']['AuthState']) ?>" />
43+
value="<?= htmlentities($this->data['stateparams']['AuthState'] ?? null) ?>" />
4444
<?php
45-
$csrfToken = htmlentities($this->data['csrfToken']);
45+
$csrfToken = htmlentities($this->data['csrfToken'] ?? null);
4646
?>
4747
<input type="hidden" name="csrf-token" value="<?= $csrfToken ?>" />
4848

@@ -67,7 +67,7 @@ function onRecaptchaLoad() {
6767
<?= $this->t('{material:login:label_username}') ?>
6868
</label>
6969
<?php
70-
$username = htmlentities($this->data['username']);
70+
$username = htmlentities($this->data['username'] ?? null);
7171
?>
7272
<input type="text" name="username" class="mdl-textfield__input"
7373
value="<?= $username ?>"
@@ -87,7 +87,7 @@ function onRecaptchaLoad() {
8787
$errorCode = htmlentities($this->data['errorcode']);
8888
if ($errorCode == 'WRONGUSERPASS') {
8989
$errorMessageKey = $this->data['errorparams'][1] ?? '{material:login:error_wronguserpass}';
90-
$errorMessageTokens = $this->data['errorparams'][2];
90+
$errorMessageTokens = $this->data['errorparams'][2] ?? null;
9191

9292
$message = htmlentities($this->t($errorMessageKey, $errorMessageTokens));
9393
?>
@@ -108,7 +108,7 @@ function onRecaptchaLoad() {
108108

109109
<div class="mdl-card__actions" layout-children="row">
110110
<?php
111-
$forgotPasswordUrl = htmlentities($this->data['forgotPasswordUrl']);
111+
$forgotPasswordUrl = htmlentities($this->data['forgotPasswordUrl'] ?? null);
112112
if (! empty($forgotPasswordUrl)) {
113113
?>
114114
<a href="<?= $forgotPasswordUrl ?>" target="_blank"

themes/material/default/error.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@
2121
</p>
2222

2323
<?php
24-
if ($this->data['showerrors']) {
24+
if ($this->data['showerrors'] ?? false) {
2525
?>
2626
<p class="mdl-typography--body-2">
27-
<?= htmlentities($this->data['error']['exceptionMsg']) ?>
27+
<?= htmlentities($this->data['error']['exceptionMsg'] ?? null) ?>
2828
</p>
2929

3030
<pre class="mdl-typography--caption">
31-
<?= htmlentities($this->data['error']['exceptionTrace']) ?>
31+
<?= htmlentities($this->data['error']['exceptionTrace'] ?? null) ?>
3232
</pre>
3333
<?php
3434
}

themes/material/default/selectidp-links.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,11 @@ function clickedAnyway(idpName) {
4040
<form action="<?= htmlentities($_SERVER['PHP_SELF']) ?>"
4141
layout-children="row" child-spacing="space-around">
4242
<input type="hidden" name="entityID"
43-
value="<?= htmlentities($this->data['entityID']) ?>" />
43+
value="<?= htmlentities($this->data['entityID'] ?? null) ?>" />
4444
<input type="hidden" name="return"
45-
value="<?= htmlentities($this->data['return']) ?>" />
45+
value="<?= htmlentities($this->data['return'] ?? null) ?>" />
4646
<input type="hidden" name="returnIDParam"
47-
value="<?= htmlentities($this->data['returnIDParam']) ?>" />
47+
value="<?= htmlentities($this->data['returnIDParam'] ?? null) ?>" />
4848

4949
<?php
5050
// in order to bypass some built-in simplesaml behavior, an extra idp
@@ -59,8 +59,8 @@ function clickedAnyway(idpName) {
5959
}
6060

6161
foreach ($enabledIdps as $idp) {
62-
$name = htmlentities($this->t($idp['name']));
63-
$idpId = htmlentities($idp['entityid']);
62+
$name = htmlentities($this->t($idp['name'] ?? null));
63+
$idpId = htmlentities($idp['entityid'] ?? null);
6464
$hoverText = $this->t('{material:selectidp:enabled}', ['{idpName}' => $name]);
6565
?>
6666
<div class="mdl-card mdl-shadow--8dp row-aware" title="<?= $hoverText ?>">
@@ -78,8 +78,8 @@ function clickedAnyway(idpName) {
7878

7979
<?php
8080
foreach ($disabledIdps as $idp) {
81-
$name = htmlentities($this->t($idp['name']));
82-
$idpId = htmlentities($idp['entityid']);
81+
$name = htmlentities($this->t($idp['name'] ?? null));
82+
$idpId = htmlentities($idp['entityid'] ?? null);
8383
$hoverText = $this->t('{material:selectidp:disabled}', ['{idpName}' => $name]);
8484
?>
8585
<div class="mdl-card mdl-shadow--2dp disabled row-aware" title="<?= $hoverText ?>"

0 commit comments

Comments
 (0)