Commit f1e4b77e authored by Thom's avatar Thom 🛠
Browse files

Purge Apps & Addons (#5795)

parent 0113e85a
Pipeline #5617 passed with stage
in 8 minutes and 2 seconds
......@@ -646,9 +646,6 @@ class installer_base {
if ($verbose){
echo $query ."\n";
}
if(!$this->dbmaster->query($query, $value['db'] . '.software_update_inst', $value['user'], $host)) {
$this->warning('Unable to set rights of user in master database: '.$value['db']."\n Query: ".$query."\n Error: ".$this->dbmaster->errorMessage);
}
$query = "GRANT SELECT, UPDATE(`updated`) ON ?? TO ?@?";
if ($verbose){
......
-- Purge apps & addons installer (#5795)
DROP TABLE 'software_package';
DROP TABLE 'software_repo';
DROP TABLE 'software_update';
DROP TABLE 'software_update_inst';
......@@ -1461,88 +1461,6 @@ CREATE TABLE `shell_user` (
-- --------------------------------------------------------
--
-- Table structure for table `software_package`
--
CREATE TABLE `software_package` (
`package_id` int(11) unsigned NOT NULL auto_increment,
`software_repo_id` int(11) unsigned NOT NULL DEFAULT '0',
`package_name` varchar(64) NOT NULL DEFAULT '',
`package_title` varchar(64) NOT NULL DEFAULT '',
`package_description` text,
`package_version` varchar(8) default NULL,
`package_type` enum('ispconfig','app','web') NOT NULL default 'app',
`package_installable` enum('yes','no','key') NOT NULL default 'yes',
`package_requires_db` enum('no','mysql') NOT NULL default 'no',
`package_remote_functions` text,
`package_key` varchar(255) NOT NULL DEFAULT '',
`package_config` text,
PRIMARY KEY (`package_id`),
UNIQUE KEY `package_name` (`package_name`)
) DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- Table structure for table `software_repo`
--
CREATE TABLE `software_repo` (
`software_repo_id` int(11) unsigned NOT NULL auto_increment,
`sys_userid` int(11) unsigned NOT NULL default '0',
`sys_groupid` int(11) unsigned NOT NULL default '0',
`sys_perm_user` varchar(5) default NULL,
`sys_perm_group` varchar(5) default NULL,
`sys_perm_other` varchar(5) default NULL,
`repo_name` varchar(64) default NULL,
`repo_url` varchar(255) default NULL,
`repo_username` varchar(64) default NULL,
`repo_password` varchar(64) default NULL,
`active` enum('n','y') NOT NULL default 'y',
PRIMARY KEY (`software_repo_id`)
) DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- Table structure for table `software_update`
--
CREATE TABLE `software_update` (
`software_update_id` int(11) unsigned NOT NULL auto_increment,
`software_repo_id` int(11) unsigned NOT NULL DEFAULT '0',
`package_name` varchar(64) NOT NULL DEFAULT '',
`update_url` varchar(255) NOT NULL DEFAULT '',
`update_md5` varchar(255) NOT NULL DEFAULT '',
`update_dependencies` varchar(255) NOT NULL DEFAULT '',
`update_title` varchar(64) NOT NULL DEFAULT '',
`v1` tinyint(1) NOT NULL default '0',
`v2` tinyint(1) NOT NULL default '0',
`v3` tinyint(1) NOT NULL default '0',
`v4` tinyint(1) NOT NULL default '0',
`type` enum('full','update') NOT NULL default 'full',
PRIMARY KEY (`software_update_id`)
) DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- Table structure for table `software_update_inst`
--
CREATE TABLE `software_update_inst` (
`software_update_inst_id` int(11) unsigned NOT NULL auto_increment,
`software_update_id` int(11) unsigned NOT NULL default '0',
`package_name` varchar(64) NOT NULL DEFAULT '',
`server_id` int(11) unsigned NOT NULL DEFAULT '0',
`status` enum('none','installing','installed','deleting','deleted','failed') NOT NULL default 'none',
PRIMARY KEY (`software_update_inst_id`),
UNIQUE KEY `software_update_id` (`software_update_id`,`package_name`,`server_id`)
) DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- Table structure for table `spamfilter_policy`
--
......@@ -2528,14 +2446,6 @@ INSERT INTO `help_faq_sections` VALUES (1,'General',0,NULL,NULL,NULL,NULL,NULL);
-- --------------------------------------------------------
--
-- Dumping data for table `software_repo`
--
INSERT INTO `software_repo` (`software_repo_id`, `sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `repo_name`, `repo_url`, `repo_username`, `repo_password`, `active`) VALUES (1, 1, 1, 'riud', 'riud', '', 'ISPConfig Addons', 'http://repo.ispconfig.org/addons/', '', '', 'n');
-- --------------------------------------------------------
--
-- Dumping data for table `spamfilter_policy`
--
......
......@@ -33,11 +33,11 @@ if( !empty($_SERVER['DOCUMENT_ROOT']) ) {
Header("Pragma: no-cache");
Header("Cache-Control: no-store, no-cache, max-age=0, must-revalidate");
Header("Content-Type: text/html; charset=utf-8");
//** Set a few php.ini values
ini_set('register_globals',0);
ini_set('magic_quotes_gpc', 0);
if (isset($_REQUEST['GLOBALS']) || isset($_FILES['GLOBALS']) || isset($_REQUEST['s']) || isset($_REQUEST['s_old']) || isset($_REQUEST['conf'])) {
die('Internal Error: var override attempt detected');
exit;
......@@ -127,8 +127,8 @@ $conf['init_scripts'] = '/etc/init.d';
$conf['interface_modules_enabled'] = 'dashboard,mail,sites,dns,tools,help';
//** Demo mode
/* The demo mode is an option to restrict certain actions in the interface like
* changing the password of users with sys_userid < 3 etc. to be
/* The demo mode is an option to restrict certain actions in the interface like
* changing the password of users with sys_userid < 3 etc. to be
* able to run the ISPConfig interface as online demo. It does not
* affect the server part. The demo mode should be always set to false
* on every normal installation
......@@ -141,10 +141,6 @@ $conf['log_file'] = $conf['ispconfig_log_dir'].$conf['fs_div'].'ispconfig.log';
$conf['log_priority'] = {ispconfig_log_priority}; // 0 = Debug, 1 = Warning, 2 = Error
//** Allow software package installations
$conf['software_updates_enabled'] = false;
//** Themes
$conf['theme'] = '{theme}';
$conf['html_content_encoding'] = 'utf-8'; // example: utf-8, iso-8859-1, ...
......
......@@ -12,8 +12,6 @@ admin_allow_del_cpuser=superadmin
admin_allow_cpuser_group=superadmin
admin_allow_firewall_config=superadmin
admin_allow_osupdate=superadmin
admin_allow_software_packages=superadmin
admin_allow_software_repo=superadmin
remote_api_allowed=yes
password_reset_allowed=yes
session_regenerate_id=yes
......@@ -44,4 +42,3 @@ warn_new_admin=yes
warn_passwd_change=no
warn_shadow_change=no
warn_group_change=no
......@@ -128,10 +128,6 @@ $conf['log_file'] = $conf['ispconfig_log_dir'].'/ispconfig.log';
$conf['log_priority'] = 0; // 0 = Debug, 1 = Warning, 2 = Error
//** Allow software package installations
$conf['software_updates_enabled'] = false;
//** Themes
$conf['theme'] = 'default';
$conf['html_content_encoding'] = 'utf-8'; // example: utf-8, iso-8859-1, ...
......
<?php
/*
Copyright (c) 2008, Till Brehm, projektfarm Gmbh
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of ISPConfig nor the names of its contributors
may be used to endorse or promote products derived from this software without
specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/*
Form Definition
Tabellendefinition
Datentypen:
- INTEGER (Wandelt Ausdrücke in Int um)
- DOUBLE
- CURRENCY (Formatiert Zahlen nach Währungsnotation)
- VARCHAR (kein weiterer Format Check)
- TEXT (kein weiterer Format Check)
- DATE (Datumsformat, Timestamp Umwandlung)
Formtype:
- TEXT (normales Textfeld)
- TEXTAREA (normales Textfeld)
- PASSWORD (Feldinhalt wird nicht angezeigt)
- SELECT (Gibt Werte als option Feld aus)
- RADIO
- CHECKBOX
- FILE
VALUE:
- Wert oder Array
Hinweis:
Das ID-Feld ist nicht bei den Table Values einzufügen.
*/
$form["title"] = "Software Package";
$form["description"] = "Modify software package details";
$form["name"] = "software_package";
$form["action"] = "software_package_edit.php";
$form["db_table"] = "software_package";
$form["db_table_idx"] = "package_id";
$form["db_history"] = "no";
$form["tab_default"] = "software_package";
$form["list_default"] = "software_package_list.php";
$form["auth"] = 'yes';
$form["auth_preset"]["userid"] = 0; // 0 = id of the user, > 0 id must match with id of current user
$form["auth_preset"]["groupid"] = 0; // 0 = default groupid of the user, > 0 id must match with groupid of current user
$form["auth_preset"]["perm_user"] = 'riud'; //r = read, i = insert, u = update, d = delete
$form["auth_preset"]["perm_group"] = 'riud'; //r = read, i = insert, u = update, d = delete
$form["auth_preset"]["perm_other"] = ''; //r = read, i = insert, u = update, d = delete
$form["tabs"]['software_package'] = array (
'title' => "Software Package",
'width' => 80,
'template' => "templates/software_package_edit.htm",
'fields' => array (
//#################################
// Beginn Datenbankfelder
//#################################
'package_title' => array (
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'filters' => array(
0 => array( 'event' => 'SAVE',
'type' => 'STRIPTAGS'),
1 => array( 'event' => 'SAVE',
'type' => 'STRIPNL')
),
'validators' => '',
'default' => '',
'value' => '',
'separator' => '',
'width' => '40',
'maxlength' => '40',
'rows' => '',
'cols' => ''
),
'package_key' => array (
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'filters' => array(
0 => array( 'event' => 'SAVE',
'type' => 'STRIPTAGS'),
1 => array( 'event' => 'SAVE',
'type' => 'STRIPNL')
),
'validators' => '',
'default' => '',
'value' => '',
'separator' => '',
'width' => '40',
'maxlength' => '40',
'rows' => '',
'cols' => ''
),
//#################################
// ENDE Datenbankfelder
//#################################
)
);
?>
<?php
/*
Copyright (c) 2008, Till Brehm, projektfarm Gmbh
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of ISPConfig nor the names of its contributors
may be used to endorse or promote products derived from this software without
specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/*
Form Definition
Tabellendefinition
Datentypen:
- INTEGER (Wandelt Ausdrücke in Int um)
- DOUBLE
- CURRENCY (Formatiert Zahlen nach Währungsnotation)
- VARCHAR (kein weiterer Format Check)
- TEXT (kein weiterer Format Check)
- DATE (Datumsformat, Timestamp Umwandlung)
Formtype:
- TEXT (normales Textfeld)
- TEXTAREA (normales Textfeld)
- PASSWORD (Feldinhalt wird nicht angezeigt)
- SELECT (Gibt Werte als option Feld aus)
- RADIO
- CHECKBOX
- FILE
VALUE:
- Wert oder Array
Hinweis:
Das ID-Feld ist nicht bei den Table Values einzufügen.
*/
$form["title"] = "Software Repository";
$form["description"] = "Software Repository which may contain addons or updates";
$form["name"] = "software_repo";
$form["action"] = "software_repo_edit.php";
$form["db_table"] = "software_repo";
$form["db_table_idx"] = "software_repo_id";
$form["db_history"] = "no";
$form["tab_default"] = "software_repo";
$form["list_default"] = "software_repo_list.php";
$form["auth"] = 'yes';
$form["auth_preset"]["userid"] = 0; // 0 = id of the user, > 0 id must match with id of current user
$form["auth_preset"]["groupid"] = 0; // 0 = default groupid of the user, > 0 id must match with groupid of current user
$form["auth_preset"]["perm_user"] = 'riud'; //r = read, i = insert, u = update, d = delete
$form["auth_preset"]["perm_group"] = 'riud'; //r = read, i = insert, u = update, d = delete
$form["auth_preset"]["perm_other"] = ''; //r = read, i = insert, u = update, d = delete
$form["tabs"]['software_repo'] = array (
'title' => "Repository",
'width' => 80,
'template' => "templates/software_repo_edit.htm",
'fields' => array (
//#################################
// Beginn Datenbankfelder
//#################################
'repo_name' => array (
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY',
'errmsg'=> 'repo_name_empty'),
1 => array ( 'type' => 'UNIQUE',
'errmsg'=> 'repo_name_unique'),
),
'filters' => array(
0 => array( 'event' => 'SAVE',
'type' => 'STRIPTAGS'),
1 => array( 'event' => 'SAVE',
'type' => 'STRIPNL')
),
'default' => '',
'value' => '',
'separator' => '',
'width' => '40',
'maxlength' => '40',
'rows' => '',
'cols' => ''
),
'repo_url' => array (
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY',
'errmsg'=> 'repo_name_empty'),
1 => array ( 'type' => 'UNIQUE',
'errmsg'=> 'repo_name_unique'),
),
'filters' => array(
0 => array( 'event' => 'SAVE',
'type' => 'STRIPTAGS'),
1 => array( 'event' => 'SAVE',
'type' => 'STRIPNL')
),
'default' => '',
'value' => '',
'separator' => '',
'width' => '40',
'maxlength' => '40',
'rows' => '',
'cols' => ''
),
'repo_username' => array (
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'filters' => array(
0 => array( 'event' => 'SAVE',
'type' => 'STRIPTAGS'),
1 => array( 'event' => 'SAVE',
'type' => 'STRIPNL')
),
'default' => '',
'value' => '',
'separator' => '',
'width' => '30',
'maxlength' => '30',
'rows' => '',
'cols' => ''
),
'repo_password' => array (
'datatype' => 'VARCHAR',
'formtype' => 'PASSWORD',
'encryption' => 'CLEARTEXT',
'default' => '',
'value' => '',
'separator' => '',
'width' => '30',
'maxlength' => '30',
'rows' => '',
'cols' => ''
),
'active' => array (
'datatype' => 'VARCHAR',
'formtype' => 'CHECKBOX',
'default' => 'y',
'value' => array(0 => 'n', 1 => 'y')
),
//#################################
// ENDE Datenbankfelder
//#################################
)
);
?>
<?php
$wb['package_title_txt'] = 'Package Title';
$wb['package_key_txt'] = 'Package Key';
$wb['Software Package'] = 'Software Package';
$wb['Modify software package details'] = 'Modify software package details';
?>
<?php
$wb['head_txt'] = 'Install software package';
$wb['install_key_txt'] = 'Enter install key';
$wb['btn_save_txt'] = 'Start Installation';
$wb['btn_cancel_txt'] = 'Cancel';
?>
<?php
$wb['list_head_txt'] = 'Software packages';
$wb['installed_txt'] = 'Status';
$wb['package_title_txt'] = 'Package';
$wb['package_description_txt'] = 'Description';
$wb['action_txt'] = 'Action';
$wb['toolsarea_head_txt'] = 'Packages';
$wb['repoupdate_txt'] = 'Update package list';
$wb['package_id_txt'] = 'local App-ID';
$wb['no_packages_txt'] = 'No packages available';
$wb['edit_txt'] = 'Edit';
$wb['delete_txt'] = 'Delete';
?>
<?php
$wb['repo_name_txt'] = 'Repository';
$wb['repo_url_txt'] = 'URL';
$wb['repo_username_txt'] = 'User (optional)';
$wb['repo_password_txt'] = 'Password (optional)';
$wb['active_txt'] = 'Active';
$wb['Software Repository which may contain addons or updates'] = 'Software Repository which may contain addons or updates';
?>
<?php
$wb['list_head_txt'] = 'Repository';
$wb['active_txt'] = 'Active';
$wb['repo_name_txt'] = 'Repository';
$wb['repo_url_txt'] = 'URL';
?>
<?php
$wb['list_head_txt'] = 'Software updates';
$wb['server_select_txt'] = 'Select server';
$wb['installed_txt'] = 'Action';
$wb['update_title_txt'] = 'Update';
$wb['version_txt'] = 'Version';
$wb['action_txt'] = 'Action';
$wb['no_updates_txt'] = 'No updates available';
?>
<?php
$wb['package_title_txt'] = 'Package Title';
$wb['package_key_txt'] = 'Package Key';
$wb['Software Package'] = 'Software Package';
$wb['Modify software package details'] = 'Modify software package details';
?>
<?php
$wb['head_txt'] = 'Исталиране на софтуерни пакети';
$wb['install_key_txt'] = 'Инсталационен ключ';
$wb['btn_save_txt'] = 'Стартирай инсталацията';
$wb['btn_cancel_txt'] = 'Отказ';
?>
<?php
$wb['list_head_txt'] = 'Софтуерни пакети';
$wb['installed_txt'] = 'Статус';
$wb['package_title_txt'] = 'Пакет';
$wb['package_description_txt'] = 'Описание';
$wb['action_txt'] = 'Действие';
$wb['toolsarea_head_txt'] = 'Пакети';
$wb['repoupdate_txt'] = 'Обновяване на пакетите ';
$wb['package_id_txt'] = 'local App-ID';
$wb['no_packages_txt'] = 'No packages available';
$wb['edit_txt'] = 'Edit';
$wb['delete_txt'] = 'Delete';
?>
<?php
$wb['repo_name_txt'] = 'Repository';
$wb['repo_url_txt'] = 'URL';
$wb['repo_username_txt'] = 'Потребител (не е задължително)';
$wb['repo_password_txt'] = 'Парола (не е задължително)';
$wb['active_txt'] = 'Активен';
$wb['Software Repository which may contain addons or updates'] = 'Software Repository which may contain addons or updates';
?>
<?php
$wb['list_head_txt'] = 'Хранилище';
$wb['active_txt'] = 'Активен';
$wb['repo_name_txt'] = 'Хранилище';
$wb['repo_url_txt'] = 'URL';