Skip to content

Commit

Permalink
Fixes for security vulnerabilities in admin mode, and other bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris-Turnbull committed Feb 8, 2021
1 parent 5c05731 commit 2c82a4d
Show file tree
Hide file tree
Showing 673 changed files with 879 additions and 828 deletions.
2 changes: 1 addition & 1 deletion license.txt
@@ -1,4 +1,4 @@
Copyright (c) 2020, Tribal Limited
Copyright (c) 2021, Tribal Limited
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -25,5 +25,5 @@
"vimeo-upload": "*",
"wowjs": "*"
},
"version": "8.8.52729"
"version": "8.8.53370"
}
2 changes: 1 addition & 1 deletion zenario/admin/admin_boxes.ajax.php
@@ -1,6 +1,6 @@
<?php
/*
* Copyright (c) 2020, Tribal Limited
* Copyright (c) 2021, Tribal Limited
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion zenario/admin/admin_toolbar.ajax.php
@@ -1,6 +1,6 @@
<?php
/*
* Copyright (c) 2020, Tribal Limited
* Copyright (c) 2021, Tribal Limited
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Expand Down
1 change: 1 addition & 0 deletions zenario/admin/db_install/local-DROP.sql
Expand Up @@ -41,6 +41,7 @@ DROP TABLE IF EXISTS `[[DB_PREFIX]]languages`;
DROP TABLE IF EXISTS `[[DB_PREFIX]]last_sent_warning_emails`;
DROP TABLE IF EXISTS `[[DB_PREFIX]]layouts`;
DROP TABLE IF EXISTS `[[DB_PREFIX]]local_revision_numbers`;
DROP TABLE IF EXISTS `[[DB_PREFIX]]lock__clean_dirs`;
DROP TABLE IF EXISTS `[[DB_PREFIX]]lov_salutations`;
DROP TABLE IF EXISTS `[[DB_PREFIX]]menu_hierarchy`;
DROP TABLE IF EXISTS `[[DB_PREFIX]]menu_nodes`;
Expand Down
4 changes: 2 additions & 2 deletions zenario/admin/db_install/local-INSERT.sql
Expand Up @@ -160,7 +160,7 @@ INSERT INTO `[[DB_PREFIX]]plugin_settings` VALUES
<p>Content items will be visible to administrators only until published. Click on the "Publish" button to make them visible to regular site visitors.</p>
<p>You will also need to make your site visible to visitors by enabling it in Organizer, in the <a href="zenario/admin/organizer.php#zenario__administration/panels/site_settings//site_disabled">Configuration -&gt; Site settings</a> section.</p>
<p>You can get support and downloads at <a href="http://zenar.io" target="_blank" rel="noopener">http://zenar.io</a>.</p>
<p>We hope you enjoy using Zenario.</p>','synchronized_setting','translatable_html',NULL,0,'','remove',NULL),
<p>We hope you enjoy using Zenario.</p>','version_controlled_content','translatable_html',NULL,0,'','remove',NULL),
(7,'image',0,12,'synchronized_setting','text','file',12,'','remove',NULL),
(7,'image_source',0,'_CUSTOM_IMAGE','synchronized_setting','text',NULL,0,'','remove',NULL),
(7,'title',0,'Just a nice image','synchronized_setting','translatable_text',NULL,0,'','remove',NULL),
Expand Down Expand Up @@ -240,7 +240,7 @@ INSERT INTO `[[DB_PREFIX]]plugin_settings` VALUES
(12,'more_link_text',0,'Discover more','synchronized_setting','translatable_text',NULL,0,'','remove',NULL),
(13,'html',0,'<p>CONTACT</p>
<h2>Nam liber tempor</h2>
<p>Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse<br>molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero<br>eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi.</p>','synchronized_setting','translatable_html',NULL,0,'','remove',NULL),
<p>Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse<br>molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero<br>eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi.</p>','version_controlled_content','translatable_html',NULL,0,'','remove',NULL),
(14,'user_form',0,1,'synchronized_setting','text','user_form',1,'','remove',NULL),
(15,'image',0,13,'synchronized_setting','text','file',13,'','remove',NULL),
(15,'image_source',0,'_CUSTOM_IMAGE','synchronized_setting','text',NULL,0,'','remove',NULL),
Expand Down
4 changes: 2 additions & 2 deletions zenario/admin/db_updates/latest_revision_no.inc.php
@@ -1,6 +1,6 @@
<?php
/*
* Copyright (c) 2020, Tribal Limited
* Copyright (c) 2021, Tribal Limited
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -37,6 +37,6 @@
define('ZENARIO_MAJOR_VERSION', '8');
define('ZENARIO_MINOR_VERSION', '8');
define('ZENARIO_IS_BUILD', true);
define('ZENARIO_REVISION', '52729');
define('ZENARIO_REVISION', '53370');

define('TINYMCE_DIR', 'zenario/libs/manually_maintained/lgpl/tinymce_4_7_3/');
@@ -1,6 +1,6 @@
<?php
/*
* Copyright (c) 2020, Tribal Limited
* Copyright (c) 2021, Tribal Limited
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Expand Down
@@ -1,6 +1,6 @@
<?php
/*
* Copyright (c) 2020, Tribal Limited
* Copyright (c) 2021, Tribal Limited
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Expand Down
@@ -1,6 +1,6 @@
<?php
/*
* Copyright (c) 2020, Tribal Limited
* Copyright (c) 2021, Tribal Limited
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Expand Down
@@ -1,6 +1,6 @@
<?php
/*
* Copyright (c) 2020, Tribal Limited
* Copyright (c) 2021, Tribal Limited
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Expand Down
@@ -1,6 +1,6 @@
<?php
/*
* Copyright (c) 2020, Tribal Limited
* Copyright (c) 2021, Tribal Limited
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Expand Down
@@ -1,6 +1,6 @@
<?php
/*
* Copyright (c) 2020, Tribal Limited
* Copyright (c) 2021, Tribal Limited
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Expand Down
@@ -1,6 +1,6 @@
<?php
/*
* Copyright (c) 2020, Tribal Limited
* Copyright (c) 2021, Tribal Limited
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Expand Down
@@ -1,6 +1,6 @@
<?php
/*
* Copyright (c) 2020, Tribal Limited
* Copyright (c) 2021, Tribal Limited
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Expand Down
@@ -1,6 +1,6 @@
<?php
/*
* Copyright (c) 2020, Tribal Limited
* Copyright (c) 2021, Tribal Limited
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Expand Down
@@ -1,6 +1,6 @@
<?php
/*
* Copyright (c) 2020, Tribal Limited
* Copyright (c) 2021, Tribal Limited
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Expand Down
@@ -1,6 +1,6 @@
<?php
/*
* Copyright (c) 2020, Tribal Limited
* Copyright (c) 2021, Tribal Limited
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Expand Down
@@ -1,6 +1,6 @@
<?php
/*
* Copyright (c) 2020, Tribal Limited
* Copyright (c) 2021, Tribal Limited
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Expand Down
@@ -1,6 +1,6 @@
<?php
/*
* Copyright (c) 2020, Tribal Limited
* Copyright (c) 2021, Tribal Limited
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion zenario/admin/dev_tools/doc_tools.js
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020, Tribal Limited
* Copyright (c) 2021, Tribal Limited
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion zenario/admin/layout_preview.php
@@ -1,6 +1,6 @@
<?php
/*
* Copyright (c) 2020, Tribal Limited
* Copyright (c) 2021, Tribal Limited
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion zenario/admin/organizer.ajax.php
@@ -1,6 +1,6 @@
<?php
/*
* Copyright (c) 2020, Tribal Limited
* Copyright (c) 2021, Tribal Limited
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion zenario/admin/quick_ajax.php
@@ -1,6 +1,6 @@
<?php
/*
* Copyright (c) 2020, Tribal Limited
* Copyright (c) 2021, Tribal Limited
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion zenario/admin/welcome.ajax.php
@@ -1,6 +1,6 @@
<?php
/*
* Copyright (c) 2020, Tribal Limited
* Copyright (c) 2021, Tribal Limited
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Expand Down
6 changes: 3 additions & 3 deletions zenario/admin/welcome.php
@@ -1,6 +1,6 @@
<?php
/*
* Copyright (c) 2020, Tribal Limited
* Copyright (c) 2021, Tribal Limited
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Expand All @@ -26,12 +26,12 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

if (version_compare(phpversion(), '7.0.0', '<')) {
if (version_compare(phpversion(), '7.2.0', '<')) {
echo '
<h1>System Requirements</h1>
<p>It looks like your server doesn\'t meet the requirements for Zenario.</p>
<p>
Zenario needs PHP version 7.0 or later to run (<em>you have version ', htmlspecialchars(phpversion()), '</em>).
Zenario needs PHP version 7.2 or later to run (<em>you have version ', htmlspecialchars(phpversion()), '</em>).
</p>';
exit;
}
Expand Down
2 changes: 1 addition & 1 deletion zenario/admin/welcome/diagnostics.yaml
Expand Up @@ -73,7 +73,7 @@ diagnostics:
full_width: true
row_class: sub_field
snippet:
html: PHP version 7.0 or later
html: PHP version 7.2 or later
visible_if: zenarioAW.togglePressed(field)
opcache_misconfigured:
grouping: sub_table
Expand Down
2 changes: 1 addition & 1 deletion zenario/admin/welcome/system_requirements.yaml
Expand Up @@ -49,7 +49,7 @@ system_requirements:
grouping: sub_table
full_width: true
snippet:
html: PHP version 7.0 or later
html: PHP version 7.2 or later
visible_if: zenarioAW.togglePressed(field)
opcache_misconfigured:
grouping: sub_table
Expand Down
2 changes: 1 addition & 1 deletion zenario/adminheader.inc.php
@@ -1,6 +1,6 @@
<?php
/*
* Copyright (c) 2020, Tribal Limited
* Copyright (c) 2021, Tribal Limited
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion zenario/ajax.php
@@ -1,6 +1,6 @@
<?php
/*
* Copyright (c) 2020, Tribal Limited
* Copyright (c) 2021, Tribal Limited
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Expand Down
5 changes: 3 additions & 2 deletions zenario/autoload/admin.php
@@ -1,6 +1,6 @@
<?php
/*
* Copyright (c) 2020, Tribal Limited
* Copyright (c) 2021, Tribal Limited
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -554,7 +554,8 @@ public static function isInactive($adminId) {
FROM ' . DB_PREFIX . 'admins
WHERE id = ' . (int)$adminId . '
AND authtype = "local"
AND COALESCE(last_login, created_date) < DATE_SUB(NOW(), INTERVAL ' . (int)$days . ' DAY)';
AND COALESCE(last_login, created_date) < DATE_SUB(NOW(), INTERVAL ' . (int)$days . ' DAY)
LIMIT 1';
$result = \ze\sql::select($sql);
return \ze\sql::numRows($result) > 0;
}
Expand Down
2 changes: 1 addition & 1 deletion zenario/autoload/adminAdm.php
@@ -1,6 +1,6 @@
<?php
/*
* Copyright (c) 2020, Tribal Limited
* Copyright (c) 2021, Tribal Limited
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion zenario/autoload/cache.php
@@ -1,6 +1,6 @@
<?php
/*
* Copyright (c) 2020, Tribal Limited
* Copyright (c) 2021, Tribal Limited
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion zenario/autoload/category.php
@@ -1,6 +1,6 @@
<?php
/*
* Copyright (c) 2020, Tribal Limited
* Copyright (c) 2021, Tribal Limited
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion zenario/autoload/categoryAdm.php
@@ -1,6 +1,6 @@
<?php
/*
* Copyright (c) 2020, Tribal Limited
* Copyright (c) 2021, Tribal Limited
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion zenario/autoload/content.php
@@ -1,6 +1,6 @@
<?php
/*
* Copyright (c) 2020, Tribal Limited
* Copyright (c) 2021, Tribal Limited
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion zenario/autoload/contentAdm.php
@@ -1,6 +1,6 @@
<?php
/*
* Copyright (c) 2020, Tribal Limited
* Copyright (c) 2021, Tribal Limited
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion zenario/autoload/cookie.php
@@ -1,6 +1,6 @@
<?php
/*
* Copyright (c) 2020, Tribal Limited
* Copyright (c) 2021, Tribal Limited
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion zenario/autoload/curl.php
@@ -1,6 +1,6 @@
<?php
/*
* Copyright (c) 2020, Tribal Limited
* Copyright (c) 2021, Tribal Limited
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion zenario/autoload/dataset.php
@@ -1,6 +1,6 @@
<?php
/*
* Copyright (c) 2020, Tribal Limited
* Copyright (c) 2021, Tribal Limited
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion zenario/autoload/datasetAdm.php
@@ -1,6 +1,6 @@
<?php
/*
* Copyright (c) 2020, Tribal Limited
* Copyright (c) 2021, Tribal Limited
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion zenario/autoload/date.php
@@ -1,6 +1,6 @@
<?php
/*
* Copyright (c) 2020, Tribal Limited
* Copyright (c) 2021, Tribal Limited
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Expand Down
4 changes: 2 additions & 2 deletions zenario/autoload/db.php
@@ -1,6 +1,6 @@
<?php
/*
* Copyright (c) 2020, Tribal Limited
* Copyright (c) 2021, Tribal Limited
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -599,7 +599,7 @@ public static function updateDataRevisionNumber2() {


//Formerly "connectToDatabase()"
public static function connect($dbhost = 'localhost', $dbname, $dbuser, $dbpass, $dbport = '', $reportErrors = true) {
public static function connect($dbhost, $dbname, $dbuser, $dbpass, $dbport = '', $reportErrors = true) {
try {
\ze::ignoreErrors();
if ($dbport) {
Expand Down

0 comments on commit 2c82a4d

Please sign in to comment.