Merge branch 'develop' into ent-5935-Logs-de-la-consola-refactorizacion

This commit is contained in:
alejandro-campos 2020-06-23 09:56:21 +02:00
commit cec16d01b8
43 changed files with 150 additions and 71 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -186,7 +186,7 @@ UpgradeApplicationID
{} {}
Version Version
{200619} {200623}
ViewReadme ViewReadme
{Yes} {Yes}

View File

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

View File

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

View File

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

View File

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

View File

@ -0,0 +1,5 @@
START TRANSACTION;
ALTER TABLE `tmensajes` ADD COLUMN `hidden_sent` TINYINT(1) UNSIGNED DEFAULT 0;
COMMIT;

View File

@ -2314,6 +2314,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 `citicity` INT(10) UNSIGNED DEFAULT '0';
ALTER TABLE `tmensajes` ADD COLUMN `id_source` BIGINT(20) UNSIGNED NOT NULL; 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 `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` 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`, ALTER TABLE `tmensajes` DROP COLUMN `id_usuario_destino`,
ADD UNIQUE INDEX `id_mensaje` (`id_mensaje`); ADD UNIQUE INDEX `id_mensaje` (`id_mensaje`);

View File

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

View File

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

View File

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

View File

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

View File

@ -149,8 +149,8 @@ define('COL_IGNORED', '#DDD');
define('COL_ALERTFIRED', '#F36201'); define('COL_ALERTFIRED', '#F36201');
define('COL_MINOR', '#F099A2'); define('COL_MINOR', '#F099A2');
define('COL_MAJOR', '#C97A4A'); define('COL_MAJOR', '#C97A4A');
define('COL_INFORMATIONAL', '#E4E4E4'); define('COL_INFORMATIONAL', '#4a83f3');
define('COL_MAINTENANCE', '#4a83f3'); define('COL_MAINTENANCE', '#E4E4E4');
define('COL_GRAPH1', '#C397F2'); define('COL_GRAPH1', '#C397F2');
define('COL_GRAPH2', '#FFE66C'); define('COL_GRAPH2', '#FFE66C');

View File

@ -285,7 +285,7 @@ function clippy_context_help($help=null)
$return = ''; $return = '';
include_once 'include/help/clippy/'.$help.'.php'; include_once $config['homedir'].'/include/help/clippy/'.$help.'.php';
ob_start(); ob_start();
$function = 'clippy_'.$help; $function = 'clippy_'.$help;

View File

@ -1448,8 +1448,8 @@ function html_print_extended_select_for_time(
} }
ob_start(); ob_start();
// Use the no_meta parameter because this image is only in the base console // 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;">'; echo '<div id="'.$uniq_name.'_default" style="width:100%;display:inline">';
html_print_select( html_print_select(
$fields, $fields,
$uniq_name.'_select', $uniq_name.'_select',
@ -1464,7 +1464,7 @@ function html_print_extended_select_for_time(
$readonly, $readonly,
'font-size: xx-small;'.$select_style 'font-size: xx-small;'.$select_style
); );
// The advanced control is only for admins // The advanced control is only for admins.
if ($admin) { if ($admin) {
echo ' <a href="javascript:">'.html_print_image( echo ' <a href="javascript:">'.html_print_image(
'images/pencil.png', 'images/pencil.png',
@ -1483,7 +1483,7 @@ function html_print_extended_select_for_time(
echo '</div>'; 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_text($uniq_name.'_text', $selected, '', $size, 255, false, $readonly, false, '', $class);
html_print_input_hidden($name, $selected, false, $uniq_name); html_print_input_hidden($name, $selected, false, $uniq_name);
@ -1514,15 +1514,15 @@ function html_print_extended_select_for_time(
echo '</div>'; echo '</div>';
echo "<script type='text/javascript'> echo "<script type='text/javascript'>
$(document).ready (function () { $(document).ready (function () {
period_select_init('$uniq_name', $allow_zero); period_select_init('".$uniq_name."', ".(($allow_zero) ? 'true' : 'null').");
period_select_events('$uniq_name'); period_select_events('".$uniq_name."');
}); });
function period_select_".$name."_update(seconds) { function period_select_".$name."_update(seconds) {
$('#text-".$uniq_name."_text').val(seconds); $('#text-".$uniq_name."_text').val(seconds);
adjustTextUnits('".$uniq_name."'); adjustTextUnits('".$uniq_name."');
calculateSeconds('".$uniq_name."'); calculateSeconds('".$uniq_name."');
$('#".$uniq_name."_manual').css('display', 'flex'); $('#".$uniq_name."_manual').show();
$('#".$uniq_name."_default').css('display', 'none'); $('#".$uniq_name."_default').hide();
} }
</script>"; </script>";
$returnString = ob_get_clean(); $returnString = ob_get_clean();

View File

@ -311,7 +311,7 @@ function messages_get_message_sent(int $message_id)
$sql = sprintf( $sql = sprintf(
"SELECT id_usuario_origen, subject, mensaje, timestamp "SELECT id_usuario_origen, subject, mensaje, timestamp
FROM tmensajes 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'], $config['id_user'],
$message_id $message_id
); );
@ -431,7 +431,7 @@ function messages_get_count_sent(string $user='')
$sql = sprintf( $sql = sprintf(
"SELECT COUNT(*) "SELECT COUNT(*)
FROM tmensajes WHERE id_usuario_origen='%s'", FROM tmensajes WHERE id_usuario_origen='%s' AND hidden_sent = 0",
$user $user
); );
@ -579,6 +579,17 @@ function messages_get_overview_sent(
$order .= ' DESC'; $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( return db_get_all_rows_field_filter(
'tmensajes', 'tmensajes',
'id_usuario_origen', 'id_usuario_origen',
@ -661,3 +672,27 @@ function messages_get_url($message_id)
// Return the message direction. // 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); 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

@ -2142,10 +2142,24 @@ function reporting_html_historical_data($table, $item, $pdf=0)
$table1->data = []; $table1->data = [];
foreach ($item['data'] as $data) { foreach ($item['data'] as $data) {
if (!is_numeric($data[__('Data')])) { if (!is_numeric($data[__('Data')])) {
$row = [ if (is_snapshot_data($data[__('Data')])) {
$data[__('Date')], if ($config['command_snapshot']) {
$data[__('Data')], $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 { } else {
$row = [ $row = [
$data[__('Date')], $data[__('Date')],
@ -2191,6 +2205,8 @@ function reporting_html_historical_data($table, $item, $pdf=0)
*/ */
function reporting_html_database_serialized($table, $item, $pdf=0) function reporting_html_database_serialized($table, $item, $pdf=0)
{ {
global $config;
$table1 = new stdClass(); $table1 = new stdClass();
$table1->width = '100%'; $table1->width = '100%';
$table1->head = [ $table1->head = [
@ -2205,9 +2221,19 @@ function reporting_html_database_serialized($table, $item, $pdf=0)
$table1->data = []; $table1->data = [];
foreach ($item['data'] as $data) { foreach ($item['data'] as $data) {
foreach ($data['data'] as $data_unserialied) { foreach ($data['data'] as $data_unserialized) {
$row = [$data['date']]; $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; $table1->data[] = $row;
} }
} }

View File

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

View File

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

View File

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

View File

@ -1174,7 +1174,7 @@ if ($searchPage) {
if (($home_url == '') || ($id_visualc == false)) { if (($home_url == '') || ($id_visualc == false)) {
$str = 'sec=network&sec2=operation/visual_console/index&refr=60'; $str = 'sec=network&sec2=operation/visual_console/index&refr=60';
} else { } 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); parse_str($str, $res);

View File

@ -129,7 +129,7 @@
<div style='height: 10px'> <div style='height: 10px'>
<?php <?php
$version = '7.0NG.746'; $version = '7.0NG.746';
$build = '200619'; $build = '200623';
$banner = "v$version Build $build"; $banner = "v$version Build $build";
error_reporting(0); error_reporting(0);

View File

@ -158,7 +158,7 @@ if ($read_message) {
).' '.$user_name.' '.__('wrote').":\n\n".$message['mensaje']; ).' '.$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>';
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">'; 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) { if ($delete_msg) {
$id = (int) get_parameter('id'); $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. // Delete message function will actually check the credentials.
ui_print_result_message( ui_print_result_message(
$result, $result,
@ -91,7 +97,11 @@ if ($multiple_delete) {
$ids = (array) get_parameter('delete_multiple_messages', []); $ids = (array) get_parameter('delete_multiple_messages', []);
foreach ($ids as $id) { 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) { if ($result === false) {
break; break;

View File

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

View File

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

View File

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

View File

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

View File

@ -143,11 +143,14 @@ class ImageProcessor implements \Psr\Log\LoggerAwareInterface
} }
$data = $this->mpdf->imageVars[$v[1]]; $data = $this->mpdf->imageVars[$v[1]];
$file = md5($data); $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]; $type = $v[1];
$data = base64_decode($v[2]); $encoded = $v[2];
$decoded = "";
$data = base64_decode(html_entity_decode($encoded));
$file = md5($data); $file = md5($data);
} }

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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