Page 1 of 1

[SOLVED] [BUG?] some HTTP Error 500 after update from 1.36.11 -> 1.36.12

Posted: Thu Jan 13, 2022 10:37 am
by agony
Hi,
after updating from version 1.36.11 to 1.36.12 i get
HTTP Error 500
in, as far as i can tell, "Zoneminder - Please donate popup" when i click "Apply"
and the Logout one when i click on "logout".
If I dismiss/cancel i get no error on both.

All the other pages seem to work fine.

Any idea?

Re: some HTTP Error 500 after update from 1.36.11 -> 1.36.12

Posted: Thu Jan 13, 2022 11:32 am
by Magic919
It's an odd problem and not one I experienced.

Do your Apache logs provide more detail?

Re: some HTTP Error 500 after update from 1.36.11 -> 1.36.12

Posted: Thu Jan 13, 2022 11:52 am
by agony
I've got "only" this in ssl_access.log

Code: Select all

...
[13/Jan/2022:12:37:10 +0100] "GET /zm/index.php?request=modal&modal=logout HTTP/1.1" 200 1663
[13/Jan/2022:12:37:12 +0100] "POST /zm/?view=logout HTTP/1.1" 500 -
...
[13/Jan/2022:12:37:51 +0100] "GET /zm/index.php?request=modal&modal=donate HTTP/1.1" 200 2806
[13/Jan/2022:12:37:52 +0100] "POST /zm/? HTTP/1.1" 500 -
and in ssl_request.log

Code: Select all

...
[13/Jan/2022:12:37:51 +0100]  TLSv1.3 TLS_AES_256_GCM_SHA384 "GET /zm/index.php?request=modal&modal=donate HTTP/1.1" 2806
[13/Jan/2022:12:37:52 +0100]  TLSv1.3 TLS_AES_256_GCM_SHA384 "POST /zm/? HTTP/1.1" -
....
[13/Jan/2022:11:31:04 +0100]  TLSv1.3 TLS_AES_256_GCM_SHA384 "GET /zm/index.php?request=modal&modal=logout HTTP/1.1" 1663
[13/Jan/2022:11:31:06 +0100]  TLSv1.3 TLS_AES_256_GCM_SHA384 "POST /zm/?view=logout HTTP/1.1" -
no errors whatsoever in apache or zoneminder log files

Re: some HTTP Error 500 after update from 1.36.11 -> 1.36.12

Posted: Thu Jan 13, 2022 12:13 pm
by agony
ok, got it!

Code: Select all

[13-Jan-2022 12:57:30 Europe/Rome] PHP Fatal error:  Uncaught Error: Call to undefined function Debug() in /usr/share/zoneminder/www/includes/csrf/csrf-magic.php:351
Stack trace:
#0 /usr/share/zoneminder/www/includes/csrf/csrf-magic.php(312): csrf_check_token('key:775a7a9b85e...')
#1 /usr/share/zoneminder/www/includes/csrf/csrf-magic.php(205): csrf_check_tokens(Array)
#2 /usr/share/zoneminder/www/index.php(246): csrf_check()
#3 {main}
  thrown in /usr/share/zoneminder/www/includes/csrf/csrf-magic.php on line 351
disabled ENABLE_CSRF_MAGIC all ok.
didn't know what and why happened.

Re: [SOLVED] some HTTP Error 500 after update from 1.36.11 -> 1.36.12

Posted: Thu Jan 13, 2022 12:42 pm
by agony
Well, it seems that this Debug Call

Code: Select all

if (!$GLOBALS['csrf']['key']) {
                    [b]Debug[/b]("Checking key: no key set"  );
                    return false;
is the only one not commented in csrf-magic.php.

maybe it's an error?

Re: [SOLVED] [BUG?] some HTTP Error 500 after update from 1.36.11 -> 1.36.12

Posted: Fri Jan 14, 2022 3:15 am
by iconnor
It should have ZM\ in front of Debug. Commit has been pushed to master and will be in 1.36.13