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

Discussions related to the 1.36.x series of ZoneMinder
Post Reply
agony
Posts: 7
Joined: Tue Dec 14, 2021 10:00 am

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

Post 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?
Last edited by agony on Thu Jan 13, 2022 12:43 pm, edited 2 times in total.
Magic919
Posts: 855
Joined: Wed Sep 18, 2013 6:56 am

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

Post by Magic919 »

It's an odd problem and not one I experienced.

Do your Apache logs provide more detail?
-----------------------------------------------------------------------
I'm nothing to do with ZM, ZMNinja or ZMES, I just use them.
Contribute funding to the devs here - https://opencollective.com/zoneminder
agony
Posts: 7
Joined: Tue Dec 14, 2021 10:00 am

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

Post 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
agony
Posts: 7
Joined: Tue Dec 14, 2021 10:00 am

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

Post 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.
agony
Posts: 7
Joined: Tue Dec 14, 2021 10:00 am

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

Post 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?
User avatar
iconnor
Posts: 1908
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

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

Post by iconnor »

It should have ZM\ in front of Debug. Commit has been pushed to master and will be in 1.36.13
Post Reply