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

ISSUE-339: oidc login #1070

Open
wants to merge 6 commits into
base: release-3.7.0
Choose a base branch
from
Open
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
16 changes: 14 additions & 2 deletions public_html/lists/admin/home.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,20 @@
</p>

<p><span class="total"><?php echo number_format($lastcampaign['total']) ?></span> Messages sent on <span class="total"><?php echo $lastcampaign['sent'] ?></span>.</p>
<p><span class="total"><?php echo number_format($lastcampaign['views']) ?> </span> Viewed (<span class="total"><?php echo sprintf('%0.2f', ($lastcampaign['views'] / ($lastcampaign['total'] - $lastcampaign['bounced']) * 100)) ?>%</span>), and <span class="total"><?php echo $lastcampaign['bounced'] ?></span> bounced (<span class="total"><?php echo sprintf('%0.2f', ($lastcampaign['bounced'] / $lastcampaign['total'] * 100)) ?>%</span>).</p>

<p>
<span class="total"><?php echo number_format($lastcampaign['views']) ?> </span> Viewed
(<?php
echo $lastcampaign['total'] > 0
? '<span class="total">' . sprintf('%0.2f', ($lastcampaign['views'] / ($lastcampaign['total'] - $lastcampaign['bounced']) * 100)) . '%</span>'
: 'N/A';
?>),
and <span class="total"><?php echo $lastcampaign['bounced'] ?></span> bounced
(<?php
echo $lastcampaign['total'] > 0
? '<span class="total">' . sprintf('%0.2f', ($lastcampaign['bounced'] / $lastcampaign['total'] * 100)) . '%</span>'
: 'N/A';
?>).
</p>
<?php
} ?>

Expand Down
4 changes: 4 additions & 0 deletions public_html/lists/admin/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ function mb_strtolower($string)
if (file_exists(dirname(__FILE__).'/../texts/'.$GLOBALS['language_module'])) {
include_once dirname(__FILE__).'/../texts/'.$GLOBALS['language_module'];
}
@session_start();
include_once dirname(__FILE__).'/languages.php';
require_once dirname(__FILE__).'/defaultconfig.php';

Expand Down Expand Up @@ -374,6 +375,9 @@ function mb_strtolower($string)
//$msg = 'Not logged in';
$logged = false;
foreach ($GLOBALS['plugins'] as $pluginname => $plugin) {
if ($pluginname == 'simplesaml' && !isset($_GET['sso'])) {
continue;
}
if ($plugin->login()) {
$logged = true;
break;
Expand Down
1 change: 0 additions & 1 deletion public_html/lists/admin/languages.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ function lanSort($a, $b)
if (!empty($GLOBALS['SessionTableName'])) {
require_once dirname(__FILE__).'/sessionlib.php';
}
@session_start();

if (isset($_POST['setlanguage']) && !empty($_POST['setlanguage']) && is_array($LANGUAGES[$_POST['setlanguage']])) {
//# just in case
Expand Down
8 changes: 8 additions & 0 deletions public_html/lists/admin/login.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,14 @@ function footer()
echo $GLOBALS['I18N']->get('Enter your email address').': </p><input type="text" name="forgotpassword" value="" size="30" />';
echo ' <input class="submit" type="submit" name="process" value="'.$GLOBALS['I18N']->get('Send password').'" />';
echo ' <div class="clear"></div>';
echo '<div style="display: flex; justify-content: space-around; margin-top: 10px;">';
if (isset($GLOBALS['plugins']['simplesaml'])) {
echo '<a href="?sso" style="display: inline-block; padding: 5px 10px; background-color: #2c2c2c; color: #fff; text-decoration: none; border-radius: 5px; font-size: 16px; text-align: center;"">SSO login</a>';
}
if (isset($GLOBALS['plugins']['OidcPlugin'])) {
echo '<a href="?oidc" style="display: inline-block; padding: 5px 10px; background-color: #2c2c2c; color: #fff; text-decoration: none; border-radius: 5px; font-size: 16px; text-align: center;">OIDC login</a>';
}
echo '</div>';
echo '</div></form>';
}

Expand Down
2 changes: 1 addition & 1 deletion public_html/lists/admin/plugins/.htaccess
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
Require all denied
</IfModule>
</FilesMatch>
<FilesMatch "index.php$">
<FilesMatch "(index.php|module.php)$">
# Apache < 2.3
<IfModule !mod_authz_core.c>
Order allow,deny
Expand Down