Merge remote-tracking branch 'origin/develop' into ent-6012-servicios-dinamicos

Conflicts:
	pandora_console/extras/mr/39.sql
This commit is contained in:
fbsanchez 2020-06-22 14:06:13 +02:00
commit 94a7b625fb
44 changed files with 276 additions and 101 deletions

View File

@ -1,5 +1,5 @@
package: pandorafms-agent-unix
Version: 7.0NG.746-200618
Version: 7.0NG.746-200622
Architecture: all
Priority: optional
Section: admin

View File

@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
pandora_version="7.0NG.746-200618"
pandora_version="7.0NG.746-200622"
echo "Test if you has the tools for to make the packages."
whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null

View File

@ -55,7 +55,7 @@ my $Sem = undef;
my $ThreadSem = undef;
use constant AGENT_VERSION => '7.0NG.746';
use constant AGENT_BUILD => '200618';
use constant AGENT_BUILD => '200622';
# Agent log default file size maximum and instances
use constant DEFAULT_MAX_LOG_SIZE => 600000;

View File

@ -3,7 +3,7 @@
#
%define name pandorafms_agent_unix
%define version 7.0NG.746
%define release 200618
%define release 200622
Summary: Pandora FMS Linux agent, PERL version
Name: %{name}

View File

@ -3,7 +3,7 @@
#
%define name pandorafms_agent_unix
%define version 7.0NG.746
%define release 200618
%define release 200622
Summary: Pandora FMS Linux agent, PERL version
Name: %{name}

View File

@ -10,7 +10,7 @@
# **********************************************************************
PI_VERSION="7.0NG.746"
PI_BUILD="200618"
PI_BUILD="200622"
OS_NAME=`uname -s`
FORCE=0

View File

@ -186,7 +186,7 @@ UpgradeApplicationID
{}
Version
{200618}
{200622}
ViewReadme
{Yes}

View File

@ -30,7 +30,7 @@ using namespace Pandora;
using namespace Pandora_Strutils;
#define PATH_SIZE _MAX_PATH+1
#define PANDORA_VERSION ("7.0NG.746(Build 200618)")
#define PANDORA_VERSION ("7.0NG.746(Build 200622)")
string pandora_path;
string pandora_dir;

View File

@ -11,7 +11,7 @@ BEGIN
VALUE "LegalCopyright", "Artica ST"
VALUE "OriginalFilename", "PandoraAgent.exe"
VALUE "ProductName", "Pandora FMS Windows Agent"
VALUE "ProductVersion", "(7.0NG.746(Build 200618))"
VALUE "ProductVersion", "(7.0NG.746(Build 200622))"
VALUE "FileVersion", "1.0.0.0"
END
END

View File

@ -1,5 +1,5 @@
package: pandorafms-console
Version: 7.0NG.746-200618
Version: 7.0NG.746-200622
Architecture: all
Priority: optional
Section: admin

View File

@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
pandora_version="7.0NG.746-200618"
pandora_version="7.0NG.746-200622"
package_pear=0
package_pandora=1

View File

@ -1,8 +1,11 @@
START TRANSACTION;
ALTER TABLE `tservice_element` ADD COLUMN `rules` text;
ALTER TABLE `tservice` ADD COLUMN `unknown_as_critical` tinyint(1) NOT NULL default 0 AFTER `warning`;
UPDATE `tservice` SET `auto_calculate`=0;
COMMIT;
ALTER TABLE `tmensajes` ADD COLUMN `hidden_sent` TINYINT(1) UNSIGNED DEFAULT 0;
COMMIT;

View File

@ -2323,6 +2323,7 @@ ALTER TABLE `tmensajes` ADD COLUMN `response_mode` VARCHAR(200) DEFAULT NULL;
ALTER TABLE `tmensajes` ADD COLUMN `citicity` INT(10) UNSIGNED DEFAULT '0';
ALTER TABLE `tmensajes` ADD COLUMN `id_source` BIGINT(20) UNSIGNED NOT NULL;
ALTER TABLE `tmensajes` ADD COLUMN `subtype` VARCHAR(255) DEFAULT '';
ALTER TABLE `tmensajes` ADD COLUMN `hidden_sent` TINYINT(1) UNSIGNED DEFAULT 0;
ALTER TABLE `tmensajes` ADD CONSTRAINT `tsource_fk` FOREIGN KEY (`id_source`) REFERENCES `tnotification_source` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
ALTER TABLE `tmensajes` DROP COLUMN `id_usuario_destino`,
ADD UNIQUE INDEX `id_mensaje` (`id_mensaje`);

View File

@ -119,7 +119,7 @@ if ($create_special_day) {
$values['description'] = (string) get_parameter('description');
$aviable_description = true;
if (preg_match('<script>', $values['description'])) {
if (preg_match('/script/i', $values['description'])) {
$aviable_description = false;
}
@ -185,7 +185,7 @@ if ($update_special_day) {
$id_group_orig = (string) get_parameter('id_group_orig');
$aviable_description = true;
if (preg_match('<script>', $description)) {
if (preg_match('/script/i', $description)) {
$aviable_description = false;
}

View File

@ -348,7 +348,7 @@ if (($create_group) && (check_acl($config['id_user'], 0, 'PM'))) {
$propagate = (bool) get_parameter('propagate');
$aviable_name = true;
if (preg_match('<script>', $name)) {
if (preg_match('/script/i', $name)) {
$aviable_name = false;
}
@ -403,7 +403,7 @@ if ($update_group) {
$other = (string) get_parameter('other');
$aviable_name = true;
if (preg_match('<script>', $name)) {
if (preg_match('/script/i', $name)) {
$aviable_name = false;
}
@ -724,8 +724,8 @@ if ($tab == 'tree') {
[
'style' => '',
'class' => 'bot',
'alt' => $group['nombre'],
'title' => $group['nombre'],
'alt' => io_safe_input($group['nombre']),
'title' => io_safe_input($group['nombre']),
],
false,
false,

View File

@ -471,7 +471,7 @@ foreach ($items as $item) {
if ($is_inventory_item) {
$external_source = json_decode($item['external_source'], true);
$agents = $external_source['id_agents'];
$modules = $external_source['inventory_modules'];
$modules = io_safe_output($external_source['inventory_modules']);
$agent_name_db = [];
foreach ($agents as $a) {

View File

@ -1090,7 +1090,7 @@ if ($dialogue_event_response) {
if ($add_comment) {
$aviability_comment = true;
$comment = get_parameter('comment');
if (preg_match('<script>', io_safe_output($comment))) {
if (preg_match('/script/i', io_safe_output($comment))) {
$aviability_comment = false;
$return = false;
}

View File

@ -85,7 +85,7 @@ function process_user_login($login, $pass, $api=false)
return process_user_login_local($login, $pass, $api);
} else {
$login_remote = process_user_login_remote($login, io_safe_output($pass), $api);
if ($login_remote == false) {
if ($login_remote == false && $config['fallback_local_auth']) {
return process_user_login_local($login, $pass, $api);
} else {
return $login_remote;
@ -258,27 +258,32 @@ function process_user_login_remote($login, $pass, $api=false)
return false;
}
if (($config['auth'] === 'ad')
&& (isset($config['ad_advanced_config']) && $config['ad_advanced_config'])
) {
$return = enterprise_hook(
'prepare_permissions_groups_of_user_ad',
[
$login,
$pass,
false,
true,
defined('METACONSOLE'),
]
);
if (($config['auth'] === 'ad')) {
// Check if autocreate remote users is active.
if ($config['autocreate_remote_users'] == 1) {
change_local_user_pass_ldap($login, $pass);
}
if ($return === 'error_permissions') {
$config['auth_error'] = __('Problems with configuration permissions. Please contact with Administrator');
return false;
} else {
if ($return === 'permissions_changed') {
$config['auth_error'] = __('Your permissions have changed. Please, login again.');
if (isset($config['ad_advanced_config']) && $config['ad_advanced_config']) {
$return = enterprise_hook(
'prepare_permissions_groups_of_user_ad',
[
$login,
$pass,
false,
true,
defined('METACONSOLE'),
]
);
if ($return === 'error_permissions') {
$config['auth_error'] = __('Problems with configuration permissions. Please contact with Administrator');
return false;
} else {
if ($return === 'permissions_changed') {
$config['auth_error'] = __('Your permissions have changed. Please, login again.');
return false;
}
}
}
} else if ($config['auth'] === 'ldap') {

View File

@ -20,7 +20,7 @@
/**
* Pandora build version and version
*/
$build_version = 'PC200618';
$build_version = 'PC200622';
$pandora_version = 'v7.0NG.746';
// Do not overwrite default timezone set if defined.

View File

@ -149,8 +149,8 @@ define('COL_IGNORED', '#DDD');
define('COL_ALERTFIRED', '#F36201');
define('COL_MINOR', '#F099A2');
define('COL_MAJOR', '#C97A4A');
define('COL_INFORMATIONAL', '#E4E4E4');
define('COL_MAINTENANCE', '#4a83f3');
define('COL_INFORMATIONAL', '#4a83f3');
define('COL_MAINTENANCE', '#E4E4E4');
define('COL_GRAPH1', '#C397F2');
define('COL_GRAPH2', '#FFE66C');
@ -268,8 +268,7 @@ define('SERVICE_ELEMENT_WEIGHT_OK', 0);
define('SERVICE_ELEMENT_WEIGHT_UNKNOWN', 0);
// Modes.
define('SERVICE_MODE_MANUAL', 0);
define('SERVICE_MODE_AUTO', 1);
define('SERVICE_MODE_SIMPLE', 2);
define('SERVICE_MODE_SMART', 1);

View File

@ -1448,8 +1448,8 @@ function html_print_extended_select_for_time(
}
ob_start();
// Use the no_meta parameter because this image is only in the base console
echo '<div id="'.$uniq_name.'_default" style="width:100%;display:flex;align-items: baseline;">';
// Use the no_meta parameter because this image is only in the base console.
echo '<div id="'.$uniq_name.'_default" style="width:100%;display:inline">';
html_print_select(
$fields,
$uniq_name.'_select',
@ -1464,7 +1464,7 @@ function html_print_extended_select_for_time(
$readonly,
'font-size: xx-small;'.$select_style
);
// The advanced control is only for admins
// The advanced control is only for admins.
if ($admin) {
echo ' <a href="javascript:">'.html_print_image(
'images/pencil.png',
@ -1483,7 +1483,7 @@ function html_print_extended_select_for_time(
echo '</div>';
echo '<div id="'.$uniq_name.'_manual" style="width:100%;display:flex;">';
echo '<div id="'.$uniq_name.'_manual" style="width:100%;display:inline;">';
html_print_input_text($uniq_name.'_text', $selected, '', $size, 255, false, $readonly, false, '', $class);
html_print_input_hidden($name, $selected, false, $uniq_name);
@ -1514,15 +1514,15 @@ function html_print_extended_select_for_time(
echo '</div>';
echo "<script type='text/javascript'>
$(document).ready (function () {
period_select_init('$uniq_name', $allow_zero);
period_select_events('$uniq_name');
period_select_init('".$uniq_name."', ".(($allow_zero) ? 'true' : 'null').");
period_select_events('".$uniq_name."');
});
function period_select_".$name."_update(seconds) {
$('#text-".$uniq_name."_text').val(seconds);
adjustTextUnits('".$uniq_name."');
calculateSeconds('".$uniq_name."');
$('#".$uniq_name."_manual').css('display', 'flex');
$('#".$uniq_name."_default').css('display', 'none');
$('#".$uniq_name."_manual').show();
$('#".$uniq_name."_default').hide();
}
</script>";
$returnString = ob_get_clean();
@ -1615,6 +1615,51 @@ function html_print_extended_select_for_cron($hour='*', $minute='*', $mday='*',
}
/**
* Prints an input slide.
*
* @param string $name Name.
* @param integer $value Value.
* @param string $id Id.
* @param boolean $return Return.
* @param integer $min Min.
* @param integer $max Max.
* @param integer $step Step.
* @param string $class Class.
* @param string $oninput Oninput.
*
* @return string HTML code for input.
*/
function html_print_input_range(
$name,
$value,
$id='',
$return=true,
$min=0,
$max=100,
$step=1,
$class='',
$oninput=''
) {
$output = '<input type="range" ';
if (isset($value) === true) {
$output .= ' value="'.$value.'" ';
}
$output .= ' id="'.$id.'" ';
$output .= ' return="'.$return.'" ';
$output .= ' min="'.$min.'" ';
$output .= ' max="'.$max.'" ';
$output .= ' step="'.$step.'" ';
$output .= ' class="'.$class.'" ';
$output .= ' oninput="'.$oninput.'" ';
$output .= ' />';
return $output;
}
/**
* Render an input text element. Extended version, use html_print_input_text() to simplify.
*
@ -3701,6 +3746,8 @@ function html_print_csrf_error()
* disabled: Disabled. Cannot be pressed.
* id: Optional id for the switch.
* class: Additional classes (string).
* value: Check or not (boolean).
* disabled: Enabled or disabled (boolean).
*
* @return string with HTML of button.
*/
@ -3842,6 +3889,20 @@ function html_print_input($data, $wrapper='div', $input_only=false)
);
break;
case 'range':
$output .= html_print_input_range(
$data['name'],
$data['value'],
(isset($data['id']) ? $data['id'] : ''),
(isset($data['return']) ? $data['return'] : true),
(isset($data['min']) ? $data['min'] : 0),
(isset($data['max']) ? $data['max'] : 100),
(isset($data['step']) ? $data['step'] : 1),
(isset($data['class']) ? $data['class'] : ''),
(isset($data['oninput']) ? $data['oninput'] : '')
);
break;
case 'image':
$output .= html_print_input_image(
$data['name'],
@ -4092,6 +4153,11 @@ function html_print_input($data, $wrapper='div', $input_only=false)
$output .= html_print_input_multicheck($data);
break;
case 'agent_autocomplete':
// Direct assignment of parameters.
$output .= ui_print_agent_autocomplete_input($data);
break;
case 'autocomplete_agent':
$agent_name = '';
if (isset($data['id_agent_hidden']) === true

View File

@ -311,7 +311,7 @@ function messages_get_message_sent(int $message_id)
$sql = sprintf(
"SELECT id_usuario_origen, subject, mensaje, timestamp
FROM tmensajes
WHERE id_usuario_origen='%s' AND id_mensaje=%d",
WHERE id_usuario_origen='%s' AND id_mensaje=%d AND hidden_sent = 0",
$config['id_user'],
$message_id
);
@ -431,7 +431,7 @@ function messages_get_count_sent(string $user='')
$sql = sprintf(
"SELECT COUNT(*)
FROM tmensajes WHERE id_usuario_origen='%s'",
FROM tmensajes WHERE id_usuario_origen='%s' AND hidden_sent = 0",
$user
);
@ -579,6 +579,17 @@ function messages_get_overview_sent(
$order .= ' DESC';
}
$filter = [
'id_usuario_origen' => $config['id_user'],
'hidden_sent' => 0,
'order' => $order,
];
return db_get_all_rows_filter(
'tmensajes',
$filter
);
return db_get_all_rows_field_filter(
'tmensajes',
'id_usuario_origen',
@ -661,3 +672,27 @@ function messages_get_url($message_id)
// Return the message direction.
return ui_get_full_url('index.php?sec=message_list&sec2=operation/messages/message_edit&read_message=1&id_message='.$message_id);
}
/**
* Deletes sent message
*
* @param integer $message_id Message id to get URL.
*
* @return boolean true when deleted, false in case of error
*/
function messages_delete_message_sent($id_message)
{
global $config;
$ret = db_process_sql_update(
'tmensajes',
['hidden_sent' => 1],
[
'id_mensaje' => $id_message,
'id_usuario_origen' => $config['id_user'],
]
);
return $ret;
}

View File

@ -160,7 +160,7 @@ function reporting_make_reporting_data(
$return = [];
if (!empty($report)) {
$contents = $report['contents'];
$contents = io_safe_output($report['contents']);
} else {
$report = io_safe_output(db_get_row('treport', 'id_report', $id_report));
$contents = io_safe_output(
@ -2236,7 +2236,7 @@ function reporting_inventory($report, $content, $type)
$es = json_decode($content['external_source'], true);
$id_agent = $es['id_agents'];
$module_name = $es['inventory_modules'];
$module_name = io_safe_input($es['inventory_modules']);
if (empty($module_name)) {
$module_name = [0 => 0];
}
@ -6147,7 +6147,13 @@ function reporting_advanced_sla(
$time_total += $time_interval;
if ($time_interval > 0) {
$total_checks++;
if (isset($current_data['type']) === false
|| ((int) $current_data['type'] === 0
&& $i !== 0)
) {
$total_checks++;
}
if ((isset($current_data['datos']))
&& ($current_data['datos'] !== false)
) {
@ -6159,7 +6165,7 @@ function reporting_advanced_sla(
$match = preg_match('/'.$max_value.'/', $current_data['datos']);
}
// Take notice of $inverse_interval value,
// Take notice of $inverse_interval value.
if ($inverse_interval == 0) {
$sla_check_value = $match;
} else {
@ -6176,19 +6182,41 @@ function reporting_advanced_sla(
// Not unknown nor not init values.
if ($sla_check_value) {
$ok_checks++;
if (isset($current_data['type']) === false
|| ((int) $current_data['type'] === 0
&& $i !== 0)
) {
$ok_checks++;
}
$time_in_ok += $time_interval;
} else {
$bad_checks++;
if (isset($current_data['type']) === false
|| ((int) $current_data['type'] === 0
&& $i !== 0)
) {
$bad_checks++;
}
$time_in_error += $time_interval;
}
} else {
if ($current_data['datos'] === null) {
$time_in_unknown += $time_interval;
$unknown_checks++;
if (isset($current_data['type']) === false
|| ((int) $current_data['type'] === 0
&& $i !== 0)
) {
$unknown_checks++;
}
} else if ($current_data['datos'] === false) {
$time_in_not_init += $time_interval;
$not_init_checks++;
if (isset($current_data['type']) === false
|| ((int) $current_data['type'] === 0
&& $i !== 0)
) {
$not_init_checks++;
}
}
}
}

View File

@ -2142,10 +2142,24 @@ function reporting_html_historical_data($table, $item, $pdf=0)
$table1->data = [];
foreach ($item['data'] as $data) {
if (!is_numeric($data[__('Data')])) {
$row = [
$data[__('Date')],
$data[__('Data')],
];
if (is_snapshot_data($data[__('Data')])) {
if ($config['command_snapshot']) {
$row = [
$data[__('Date')],
'<img style="width:300px" src="'.io_safe_input($data[__('Data')]).'"></a>',
];
} else {
$row = [
$data[__('Date')],
wordwrap(io_safe_input($data[__('Data')]), 60, "<br>\n", true),
];
}
} else {
$row = [
$data[__('Date')],
$data[__('Data')],
];
}
} else {
$row = [
$data[__('Date')],
@ -2191,6 +2205,8 @@ function reporting_html_historical_data($table, $item, $pdf=0)
*/
function reporting_html_database_serialized($table, $item, $pdf=0)
{
global $config;
$table1 = new stdClass();
$table1->width = '100%';
$table1->head = [
@ -2205,9 +2221,19 @@ function reporting_html_database_serialized($table, $item, $pdf=0)
$table1->data = [];
foreach ($item['data'] as $data) {
foreach ($data['data'] as $data_unserialied) {
foreach ($data['data'] as $data_unserialized) {
$row = [$data['date']];
$row = array_merge($row, $data_unserialied);
foreach ($data_unserialized as $key => $data_value) {
if (is_snapshot_data($data_unserialized[$key])) {
if ($config['command_snapshot']) {
$data_unserialized[$key] = '<img style="width:300px" src="'.io_safe_input($data_value).'"></a>';
} else {
$data_unserialized[$key] = wordwrap(io_safe_input($data_value), 60, "<br>\n", true);
}
}
}
$row = array_merge($row, $data_unserialized);
$table1->data[] = $row;
}
}

View File

@ -226,14 +226,13 @@ function flot_area_graph(
$config['custom_graph_width'],
true
);
/*
$return .= "<div id='timestamp_$graph_id'
class='timestamp_graph'
style=' font-size:".$params['font_size']."pt;
display:none; position:absolute;
background:#fff; border: solid 1px #aaa;
padding: 2px; z-index:1000;'></div>";
*/
$return .= "<div id='timestamp_$graph_id'
class='timestamp_graph'
style='font-size:".$params['font_size']."pt;
display:none; position:absolute;
background:#fff; border: solid 1px #aaa;
padding: 2px; z-index:1000;
'></div>";
$return .= "<div id='$graph_id' class='";
if ($params['type'] == 'area_simple') {

View File

@ -844,7 +844,7 @@ function post_process_select_events(name) {
function period_select_init(name, allow_zero) {
// Manual mode is hidden by default
$("#" + name + "_manual").css("display", "none");
$("#" + name + "_default").css("display", "flex");
$("#" + name + "_default").css("display", "inline");
// If the text input is empty, we put on it 5 minutes by default
if ($("#text-" + name + "_text").val() == "") {
@ -858,7 +858,7 @@ function period_select_init(name, allow_zero) {
}
} else if ($("#text-" + name + "_text").val() == 0 && allow_zero != true) {
$("#" + name + "_units option:last").prop("selected", false);
$("#" + name + "_manual").css("display", "flex");
$("#" + name + "_manual").css("display", "inline");
$("#" + name + "_default").css("display", "none");
}
}
@ -947,13 +947,13 @@ function selectFirst(name) {
*/
function toggleBoth(name) {
if ($("#" + name + "_default").css("display") == "none") {
$("#" + name + "_default").css("display", "flex");
$("#" + name + "_default").css("display", "inline");
} else {
$("#" + name + "_default").css("display", "none");
}
if ($("#" + name + "_manual").css("display") == "none") {
$("#" + name + "_manual").css("display", "flex");
$("#" + name + "_manual").css("display", "inline");
} else {
$("#" + name + "_manual").css("display", "none");
}

View File

@ -70,9 +70,8 @@ ul.wizard li > textarea {
}
.wizard .discovery_inline_input {
display: flex;
display: inline;
align-content: end;
flex: 0;
align-self: flex-start;
}

View File

@ -1166,7 +1166,7 @@ if ($searchPage) {
if (($home_url == '') || ($id_visualc == false)) {
$str = 'sec=network&sec2=operation/visual_console/index&refr=60';
} else {
$str = 'sec=network&sec2=operation/visual_console/render_view&id='.$id_visualc.'&refr=60';
$str = 'sec=network&sec2=operation/visual_console/render_view&id='.$id_visualc;
}
parse_str($str, $res);

View File

@ -158,7 +158,7 @@ if ($read_message) {
).' '.$user_name.' '.__('wrote').":\n\n".$message['mensaje'];
echo '<form id="delete_message" method="post" action="index.php?sec=message_list&amp;sec2=operation/messages/message_list&show_sent=1&amp;delete_message=1&amp;id='.$message_id.'">';
echo '<form id="delete_message" method="post" action="index.php?sec=message_list&amp;sec2=operation/messages/message_list&show_sent='.$show_sent.'&amp;delete_message=1&amp;id='.$message_id.'">';
echo '</form>';
echo '<form id="reply_message" method="post" action="index.php?sec=message_list&sec2=operation/messages/message_edit&amp;new_msg=1&amp;reply=1">';

View File

@ -78,7 +78,13 @@ if ($mark_unread) {
if ($delete_msg) {
$id = (int) get_parameter('id');
$result = messages_delete_message($id);
if ($show_sent) {
$result = messages_delete_message_sent($id);
} else {
$result = messages_delete_message($id);
}
// Delete message function will actually check the credentials.
ui_print_result_message(
$result,
@ -91,7 +97,11 @@ if ($multiple_delete) {
$ids = (array) get_parameter('delete_multiple_messages', []);
foreach ($ids as $id) {
$result = messages_delete_message($id);
if ($show_sent) {
$result = messages_delete_message_sent($id);
} else {
$result = messages_delete_message($id);
}
if ($result === false) {
break;

View File

@ -3,7 +3,7 @@
#
%define name pandorafms_console
%define version 7.0NG.746
%define release 200618
%define release 200622
# User and Group under which Apache is running
%define httpd_name httpd

View File

@ -3,7 +3,7 @@
#
%define name pandorafms_console
%define version 7.0NG.746
%define release 200618
%define release 200622
# User and Group under which Apache is running
%define httpd_name httpd

View File

@ -3,7 +3,7 @@
#
%define name pandorafms_console
%define version 7.0NG.746
%define release 200618
%define release 200622
%define httpd_name httpd
# User and Group under which Apache is running
%define httpd_name apache2

View File

@ -1291,6 +1291,7 @@ CREATE TABLE IF NOT EXISTS `tmensajes` (
`citicity` INT(10) UNSIGNED DEFAULT '0',
`id_source` BIGINT(20) UNSIGNED NOT NULL,
`subtype` VARCHAR(255) DEFAULT '',
`hidden_sent` TINYINT(1) UNSIGNED DEFAULT 0,
PRIMARY KEY (`id_mensaje`),
UNIQUE KEY `id_mensaje` (`id_mensaje`),
KEY `tsource_fk` (`id_source`),

View File

@ -143,11 +143,14 @@ class ImageProcessor implements \Psr\Log\LoggerAwareInterface
}
$data = $this->mpdf->imageVars[$v[1]];
$file = md5($data);
}
if (preg_match('/data:image\/(gif|jpeg|png);base64,(.*)/', $file, $v)) {
if (preg_match('~data:image/(gif|jpeg|png);base64,(.*)~', $file, $v)) {
$type = $v[1];
$data = base64_decode($v[2]);
$encoded = $v[2];
$decoded = "";
$data = base64_decode(html_entity_decode($encoded));
$file = md5($data);
}

View File

@ -1,5 +1,5 @@
package: pandorafms-server
Version: 7.0NG.746-200618
Version: 7.0NG.746-200622
Architecture: all
Priority: optional
Section: admin

View File

@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
pandora_version="7.0NG.746-200618"
pandora_version="7.0NG.746-200622"
package_cpan=0
package_pandora=1

View File

@ -45,7 +45,7 @@ our @EXPORT = qw(
# version: Defines actual version of Pandora Server for this module only
my $pandora_version = "7.0NG.746";
my $pandora_build = "200618";
my $pandora_build = "200622";
our $VERSION = $pandora_version." ".$pandora_build;
# Setup hash

View File

@ -33,7 +33,7 @@ our @ISA = qw(Exporter);
# version: Defines actual version of Pandora Server for this module only
my $pandora_version = "7.0NG.746";
my $pandora_build = "200618";
my $pandora_build = "200622";
our $VERSION = $pandora_version." ".$pandora_build;
our %EXPORT_TAGS = ( 'all' => [ qw() ] );

View File

@ -3,7 +3,7 @@
#
%define name pandorafms_server
%define version 7.0NG.746
%define release 200618
%define release 200622
Summary: Pandora FMS Server
Name: %{name}

View File

@ -3,7 +3,7 @@
#
%define name pandorafms_server
%define version 7.0NG.746
%define release 200618
%define release 200622
Summary: Pandora FMS Server
Name: %{name}

View File

@ -9,7 +9,7 @@
# **********************************************************************
PI_VERSION="7.0NG.746"
PI_BUILD="200618"
PI_BUILD="200622"
MODE=$1
if [ $# -gt 1 ]; then

View File

@ -35,7 +35,7 @@ use PandoraFMS::Config;
use PandoraFMS::DB;
# version: define current version
my $version = "7.0NG.746 PS200618";
my $version = "7.0NG.746 PS200622";
# Pandora server configuration
my %conf;

View File

@ -36,7 +36,7 @@ use Encode::Locale;
Encode::Locale::decode_argv;
# version: define current version
my $version = "7.0NG.746 PS200618";
my $version = "7.0NG.746 PS200622";
# save program name for logging
my $progname = basename($0);