Page 1 of 1

Typo in auth.php in 1.36.24 via ppa:iconnor/zoneminder-1.36

Posted: Mon Aug 29, 2022 1:53 pm
by hybrid
Pretty sure I found a typo in auth.php line 51.

Code: Select all

$user['Pasword'] = $bcrypt_hash;
Should be

Code: Select all

$user['Password'] = $bcrypt_hash;
Edit: It was returning this error, just in case anyone else gets it

Code: Select all

PHP Fatal error:  Uncaught TypeError: Cannot access offset of type string on string in /usr/share/zoneminder/www/includes/auth.php:51\nStack trace:\n#0 /usr/share/zoneminder/www/includes/actions/login.php(95): migrateHash()\n#1 /usr/share/zoneminder/www/index.php(240): require_once('...')\n#2 {main}\n  thrown in /usr/share/zoneminder/www/includes/auth.php on line 51

Re: Typo in auth.php in 1.36.24 via ppa:iconnor/zoneminder-1.36

Posted: Mon Aug 29, 2022 7:55 pm
by iconnor
It's worse than that. $user is actually a username string.... good find.

Re: Typo in auth.php in 1.36.24 via ppa:iconnor/zoneminder-1.36

Posted: Mon Aug 29, 2022 10:09 pm
by webdriver
why my 1.36.24 doesn't report such error? I install via "sudo add-apt-repository ppa:iconnor/zoneminder-1.36"

Re: Typo in auth.php in 1.36.24 via ppa:iconnor/zoneminder-1.36

Posted: Mon Aug 29, 2022 10:13 pm
by iconnor
That code only gets execute if we need to update hashed password. It would really only run on an upgrade from 1.32...

Re: Typo in auth.php in 1.36.24 via ppa:iconnor/zoneminder-1.36

Posted: Mon Aug 29, 2022 10:41 pm
by hybrid
iconnor wrote: Mon Aug 29, 2022 7:55 pm It's worse than that. $user is actually a username string.... good find.
Yeah that's definitely what the error suggested, but just fixing the typo was enough to get me up and running.
I was in the process of adding in a type check and/or finding where $user was initially set when I noticed the typo.

Re: Typo in auth.php in 1.36.24 via ppa:iconnor/zoneminder-1.36

Posted: Mon Aug 29, 2022 11:46 pm
by iconnor
I expect to release 1.36.25 tomorrow which will include the fixes.