From ee858280e11b7ef599ccc4fcb171075c6572745b Mon Sep 17 00:00:00 2001 From: Jose Gonzalez Date: Fri, 9 Apr 2021 13:30:31 +0200 Subject: [PATCH] Changed CSRF hidden function for allow return --- pandora_console/include/functions_html.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pandora_console/include/functions_html.php b/pandora_console/include/functions_html.php index a5b4eb4448..ed8bc0922e 100644 --- a/pandora_console/include/functions_html.php +++ b/pandora_console/include/functions_html.php @@ -4298,10 +4298,14 @@ function html_print_sort_arrows($params, $order_tag, $up='up', $down='down') /** * Print an input hidden with a new csrf token generated + * + * @param boolean $return If it is true return a string with the output instead to echo the output. + * + * @return void */ -function html_print_csrf_hidden() +function html_print_csrf_hidden(bool $return=false) { - html_print_input_hidden('csrf_code', generate_csrf_code()); + return html_print_input_hidden('csrf_code', generate_csrf_code(), $return); }