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

Discussions related to the 1.36.x series of ZoneMinder
Post Reply
hybrid
Posts: 5
Joined: Thu Mar 07, 2019 8:02 am

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

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

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

Post by iconnor »

It's worse than that. $user is actually a username string.... good find.
webdriver
Posts: 13
Joined: Mon Aug 15, 2022 5:28 am

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

Post by webdriver »

why my 1.36.24 doesn't report such error? I install via "sudo add-apt-repository ppa:iconnor/zoneminder-1.36"
User avatar
iconnor
Posts: 3274
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

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

Post 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...
hybrid
Posts: 5
Joined: Thu Mar 07, 2019 8:02 am

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

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

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

Post by iconnor »

I expect to release 1.36.25 tomorrow which will include the fixes.
Post Reply