Initial Upload

This commit is contained in:
Matt Batchelder
2025-12-02 10:32:59 -05:00
commit 05ce0da296
2240 changed files with 467811 additions and 0 deletions

32
docker/tmp/.htaccess Normal file
View File

@@ -0,0 +1,32 @@
# htaccess file for CMS instances using an Alias.
# REPLACE_ME gets replaced on container start by entrypoint.sh
RewriteEngine On
RewriteBase REPLACE_ME/
# fix authorization header
RewriteCond %{HTTP:Authorization} .+
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
# requests for api authorize
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} ^REPLACE_ME/api/authorize/.*$
RewriteRule ^ api/authorize/index.php [QSA,L]
# requests that start with api go down to api/index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} ^REPLACE_ME/api/.*$
RewriteRule ^ api/index.php [QSA,L]
# install
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} ^REPLACE_ME/install/.*$
RewriteRule ^ install/index.php [QSA,L]
# all others - i.e. web
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !\.(css|js|png|jpg)$
RewriteCond %{REQUEST_URI} !^REPLACE_ME/dist/.*$
RewriteCond %{REQUEST_URI} !^REPLACE_ME/theme/.*$
RewriteRule ^ index.php [QSA,L]

View File

@@ -0,0 +1,97 @@
<?php
/*
* Copyright (C) 2024 Xibo Signage Ltd
*
* Xibo - Digital Signage - https://xibosignage.com
*
* This file is part of Xibo.
*
* Xibo is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* any later version.
*
* Xibo is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with Xibo. If not, see <http://www.gnu.org/licenses/>.
*/
// If you need to add custom configuration settings to the CMS settings.php file,
// this is the place to do it.
// For example, if you want to configure SAML authentication, you can add the
// required configuration here
/*
$authentication = new \Xibo\Middleware\SAMLAuthentication();
$samlSettings = [
'workflow' => [
// Enable/Disable Just-In-Time provisioning
'jit' => true,
// Attribute to identify the user
'field_to_identify' => 'UserName', // Alternatives: UserID, UserName or email
// Default libraryQuota assigned to the created user by JIT
'libraryQuota' => 1000,
// Home Page
'homePage' => 'icondashboard.view',
// Enable/Disable Single Logout
'slo' => true,
// Attribute mapping between XIBO-CMS and the IdP
'mapping' => [
'UserID' => '',
'usertypeid' => '',
'UserName' => 'uid',
'email' => 'mail',
],
// Initial User Group
'group' => 'Users',
// Group Assignments
'matchGroups' => [
'enabled' => false,
'attribute' => null,
'extractionRegEx' => null,
],
],
// Settings for the PHP-SAML toolkit.
// See documentation: https://github.com/onelogin/php-saml#settings
'strict' => false,
'debug' => true,
'idp' => [
'entityId' => 'https://idp.example.com/simplesaml/saml2/idp/metadata.php',
'singleSignOnService' => [
'url' => 'http://idp.example.com/simplesaml/saml2/idp/SSOService.php',
],
'singleLogoutService' => [
'url' => 'http://idp.example.com/simplesaml/saml2/idp/SingleLogoutService.php',
],
'x509cert' => '',
],
'sp' => [
'entityId' => 'http://xibo-cms.example.com/saml/metadata',
'assertionConsumerService' => [
'url' => 'http://xibo-cms.example.com/saml/acs',
],
'singleLogoutService' => [
'url' => 'http://xibo-cms.example.com/saml/sls',
],
'NameIDFormat' => 'urn:oasis:names:tc:SAML:2.0:nameid-format:emailAddress',
'x509cert' => '',
'privateKey' > '',
,
'security' => [
'nameIdEncrypted' => false,
'authnRequestsSigned' => false,
'logoutRequestSigned' => false,
'logoutResponseSigned' => false,
'signMetadata' => false,
'wantMessagesSigned' => false,
'wantAssertionsSigned' => false,
'wantAssertionsEncrypted' => false,
'wantNameIdEncrypted' => false,
],
];
*/

View File

@@ -0,0 +1,47 @@
<?php
/*
* Xibo - Digital Signage - http://www.xibo.org.uk
*
* This file is part of Xibo - and is automatically generated by the installer
*
* You should not need to edit this file, unless your SQL connection details have changed.
*/
defined('XIBO') or die(__("Sorry, you are not allowed to directly access this page.") . "<br />" . __("Please press the back button in your browser."));
global $dbhost;
global $dbuser;
global $dbpass;
global $dbname;
global $dbssl;
global $dbsslverify;
$dbhost = $_SERVER['MYSQL_HOST'] . ':' . $_SERVER['MYSQL_PORT'];
$dbuser = $_SERVER['MYSQL_USER'];
$dbpass = $_SERVER['MYSQL_PASSWORD'];
$dbname = $_SERVER['MYSQL_DATABASE'];
$dbssl = $_SERVER['MYSQL_ATTR_SSL_CA'];
$dbsslverify = $_SERVER['MYSQL_ATTR_SSL_VERIFY_SERVER_CERT'];
if (!defined('SECRET_KEY')) {
define('SECRET_KEY','');
}
if (array_key_exists('CMS_USE_MEMCACHED', $_SERVER)
&& ($_SERVER['CMS_USE_MEMCACHED'] === true || $_SERVER['CMS_USE_MEMCACHED'] === 'true')
) {
global $cacheDrivers;
$cacheDrivers = [
new Stash\Driver\Memcache([
'servers' => [$_SERVER['MEMCACHED_HOST'], $_SERVER['MEMCACHED_PORT']],
'CONNECT_TIMEOUT' => 10,
])
];
}
if (file_exists('/var/www/cms/custom/settings-custom.php')) {
include('/var/www/cms/custom/settings-custom.php');
}
?>