From 9753a1d68aad8e36b7899069c304be002cbd3040 Mon Sep 17 00:00:00 2001 From: tsadpbb <90269351+tsadpbb@users.noreply.github.com> Date: Mon, 16 Dec 2024 13:06:36 -0600 Subject: [PATCH] Fix #1010: Re order authentication (#1012) Re order auth for trends --- Changelog | 1 + cgi/trends.c | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Changelog b/Changelog index 8449f3ee9..5d8b249db 100644 --- a/Changelog +++ b/Changelog @@ -5,6 +5,7 @@ Nagios Core 4 Change Log 4.5.9 - 2024-XX-XX ------------------ * Fix unreachable notifications (Dylan Anderson) +* Fix authentication in trends.cgi (Dylan Anderson) 4.5.8 - 2024-11-19 ------------------ diff --git a/cgi/trends.c b/cgi/trends.c index f441a3d02..b37c65a1c 100644 --- a/cgi/trends.c +++ b/cgi/trends.c @@ -317,9 +317,6 @@ int main(int argc, char **argv) { /* get the arguments passed in the URL */ process_cgivars(); - /* get authentication information */ - get_authentication_information(¤t_authdata); - result = read_all_object_configuration_data(main_config_file, READ_ALL_OBJECT_DATA); if(result == ERROR) { if(mode == CREATE_HTML) { @@ -343,6 +340,9 @@ int main(int argc, char **argv) { document_header(TRUE); + /* get authentication information */ + get_authentication_information(¤t_authdata); + if(compute_time_from_parts == TRUE) compute_report_times();