Merge remote-tracking branch 'origin/develop' into 2016-plugin-monitorizacion-con-docker-swarm

This commit is contained in:
fbsanchez 2018-05-22 11:41:29 +02:00
commit a5be501f4d
30 changed files with 50 additions and 61 deletions

View File

@ -1,5 +1,5 @@
package: pandorafms-agent-unix
Version: 7.0NG.722-180521
Version: 7.0NG.722-180522
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.722-180521"
pandora_version="7.0NG.722-180522"
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

@ -42,7 +42,7 @@ my $Sem = undef;
my $ThreadSem = undef;
use constant AGENT_VERSION => '7.0NG.722';
use constant AGENT_BUILD => '180521';
use constant AGENT_BUILD => '180522';
# 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.722
%define release 180521
%define release 180522
Summary: Pandora FMS Linux agent, PERL version
Name: %{name}

View File

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

View File

@ -10,7 +10,7 @@
# **********************************************************************
PI_VERSION="7.0NG.722"
PI_BUILD="180521"
PI_BUILD="180522"
OS_NAME=`uname -s`
FORCE=0

View File

@ -186,7 +186,7 @@ UpgradeApplicationID
{}
Version
{180521}
{180522}
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.722(Build 180521)")
#define PANDORA_VERSION ("7.0NG.722(Build 180522)")
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.722(Build 180521))"
VALUE "ProductVersion", "(7.0NG.722(Build 180522))"
VALUE "FileVersion", "1.0.0.0"
END
END

View File

@ -1,5 +1,5 @@
package: pandorafms-console
Version: 7.0NG.722-180521
Version: 7.0NG.722-180522
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.722-180521"
pandora_version="7.0NG.722-180522"
package_pear=0
package_pandora=1

View File

@ -29,8 +29,6 @@ if (! check_acl($config['id_user'], 0, "PM")) {
exit;
}
ui_print_page_header(__('Pandora audit') . " » " . __('Review Logs'), "images/gm_log.png", false, "", true);
$offset = (int) get_parameter("offset");
$filter_type = (string) get_parameter("filter_type");
$filter_user = (string) get_parameter("filter_user");
@ -45,6 +43,19 @@ $filter_query = "&filter_type=" . $filter_type
. "&filter_period=" . $filter_period
. "&filter_ip=" . $filter_ip;
$csv_url = ui_get_full_url(false, false, false, false)
. 'index.php?sec=gextensions&sec2=godmode/audit_log_csv'
. $filter_query;
$csv_img = html_print_image("images/csv_mc.png", true, array ("title" => __('Export to CSV')));
$header_buttons = array(
'csv' => array(
'active' => false,
'text' => '<a href="' . $csv_url . '">' . $csv_img . '</a>'
)
);
ui_print_page_header(__('Pandora audit') . " &raquo; " . __('Review Logs'), "images/gm_log.png", false, "", true, $header_buttons);
$table = new stdClass();
$table->class = "databox filters";
$table->cellstyle = array();
@ -108,11 +119,11 @@ if (!empty($filter_user)) {
}
if (!empty($filter_text)) {
$filter .= " AND (accion LIKE '%'" . $filter_text . "'%' OR descripcion LIKE '%'" . $filter_text . "'%')";
$filter .= sprintf(" AND (accion LIKE '%%%s%%' OR descripcion LIKE '%%%s%%')", $filter_text, $filter_text);
}
if (!empty($filter_ip)) {
$filter .= sprintf(" AND ip_origen LIKE '%'", $filter_ip);
$filter .= sprintf(" AND ip_origen LIKE '%%%s%%'", $filter_ip);
}
if (!empty($filter_period)) {
@ -239,13 +250,6 @@ foreach ($result as $row) {
html_print_table($table);
echo '<div style="width: '.$table->width.'" class="action-buttons">';
$csv_url = ui_get_full_url(false, false, false, false) . 'index.php?sec=gextensions&sec2=godmode/audit_log_csv' . $filter_query;
echo '<a href="' . $csv_url . '">'
. html_print_button(__("Export to CSV"), "export_csv", false, "", "class=sub upd", true, false)
. '</a>';
echo '</div>';
if ($enterprise_include !== ENTERPRISE_NOT_HOOK) {
enterprise_hook('enterpriseAuditFooter');
}

View File

@ -59,11 +59,11 @@ if (!empty($filter_user)) {
}
if (!empty($filter_text)) {
$filter .= " AND (accion LIKE '%'" . $filter_text . "'%' OR descripcion LIKE '%'" . $filter_text . "'%')";
$filter .= sprintf(" AND (accion LIKE '%%%s%%' OR descripcion LIKE '%%%s%%')", $filter_text, $filter_text);
}
if (!empty($filter_ip)) {
$filter .= sprintf(" AND ip_origen LIKE '%'", $filter_ip);
$filter .= sprintf(" AND ip_origen LIKE '%%%s%%'", $filter_ip);
}
if (!empty($filter_period)) {

View File

@ -22,7 +22,7 @@
/**
* Pandora build version and version
*/
$build_version = 'PC180521';
$build_version = 'PC180522';
$pandora_version = 'v7.0NG.722';
// Do not overwrite default timezone set if defined.

View File

@ -361,13 +361,8 @@ function perform_response(target, response_id) {
timeout: 10000,
dataType: 'html',
success: function (data) {
if (data == '') {
$('#response_out').html('<i>Unreachable host</i>');
}
else {
var out = data.replace(/[\n|\r]/g, "<br>");
$('#response_out').html(out);
}
var out = data.replace(/[\n|\r]/g, "<br>");
$('#response_out').html(out);
$('#response_loading_command').hide();
$('#re_exec_command').show();
}

View File

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

View File

@ -32,6 +32,9 @@ class System {
}
$this->session = $_SESSION;
session_write_close();
require_once($this->getConfig('homedir') . '/include/functions.php');
require_once($this->getConfig('homedir') . '/include/functions_io.php');
}
public static function getInstance() {
@ -51,29 +54,14 @@ class System {
}
public function getRequest($name, $default = null) {
$return = $default;
if (isset($_POST[$name])) {
$return = $_POST[$name];
}
else {
if (isset($_GET[$name])) {
$return = $_GET[$name];
}
}
return $return;
return get_parameter($name, $default);
}
public function safeOutput($value) {
require_once($this->getConfig('homedir') . '/include/functions_io.php');
return io_safe_output($value);
}
public function safeInput($value) {
require_once($this->getConfig('homedir') . '/include/functions_io.php');
return io_safe_input($value);
}

View File

@ -74,7 +74,6 @@ class User {
if (($user == null) && ($password == null)) {
$user = $system->getRequest('user', null);
$user = $system->safeInput($user);
$password = $system->getRequest('password', null);
}
@ -141,6 +140,7 @@ class User {
}
if (empty($code)) {
$code = $system->getRequest('auth_code', null);
$code = $system->safeOutput($code);
}
if (!empty($user) && !empty($code)) {

View File

@ -49,7 +49,9 @@ class Tactical {
switch ($parameter2) {
case 'render_status_pie':
$links = $system->getRequest('links', '');
$links = $system->safeOutput($links);
$data = $system->getRequest('data', '');
$data = $system->safeOutput($data);
$data = str_replace('\\','',$data);
$links = str_replace('\\','',$links);
$width = $system->getRequest('width', 230);

View File

@ -3,7 +3,7 @@
#
%define name pandorafms_console
%define version 7.0NG.722
%define release 180521
%define release 180522
# 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.722
%define release 180521
%define release 180522
%define httpd_name httpd
# User and Group under which Apache is running
%define httpd_name apache2

View File

@ -1,5 +1,5 @@
package: pandorafms-server
Version: 7.0NG.722-180521
Version: 7.0NG.722-180522
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.722-180521"
pandora_version="7.0NG.722-180522"
package_cpan=0
package_pandora=1

View File

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

View File

@ -31,7 +31,7 @@ our @ISA = qw(Exporter);
# version: Defines actual version of Pandora Server for this module only
my $pandora_version = "7.0NG.722";
my $pandora_build = "180521";
my $pandora_build = "180522";
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.722
%define release 180521
%define release 180522
Summary: Pandora FMS Server
Name: %{name}

View File

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

View File

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

View File

@ -33,7 +33,7 @@ use PandoraFMS::Tools;
use PandoraFMS::DB;
# version: define current version
my $version = "7.0NG.722 PS180521";
my $version = "7.0NG.722 PS180522";
# 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.722 PS180521";
my $version = "7.0NG.722 PS180522";
# save program name for logging
my $progname = basename($0);