I have upgraded to 1.12 (from 1.9.14) and we are getting errors. I have AD authentication and HTTP Passthru working on the staff side. AD logins working on the client side. But HTTP passthru is not working at all on the client side and giving me http 500 error.
I dumped the php errors to a log file and I get this:
[09-May-2019 14:14:51 UTC] PHP Fatal error: Uncaught ObjectNotUnique: One object was expected; however multiple objects in the database matched the query. In fact, there are 2 matching objects. in C:\inetpub\wwwroot\include\class.orm.php:1355
Stack trace:
#0 C:\inetpub\wwwroot\include\class.orm.php(606): QuerySet->one()
#1 C:\inetpub\wwwroot\include\class.orm.php(381): VerySimpleModel::lookup(Array)
#2 C:\inetpub\wwwroot\include\class.orm.php(417): VerySimpleModel->get('user', NULL)
#3 C:\inetpub\wwwroot\include\class.user.php(1084): VerySimpleModel->__get('user')
#4 phar://C:/inetpub/wwwroot/include/plugins/auth-passthru.phar/authenticate.php(68): UserAccount->getUser()
#5 C:\inetpub\wwwroot\include\class.auth.php(276): UserHttpAuthentication->signOn()
#6 C:\inetpub\wwwroot\login.php(115): AuthenticationBackend::processSignOn(NULL, false)
#7 C:\inetpub\wwwroot\secure.inc.php(26): require('C:\inetpub\wwwr...')
#8 C:\inetpub\wwwroot\secure.inc.php(33): clientLoginPage()
#9 C:\inetpub\wwwroot\open.php(66): require_once('C:\inetpub\wwwr...')
#10 {main in C:\inetpub\wwwroot\include\class.orm.php on line 1355
I have verified that their is only 1 user account in AD. I also used a test file to make sure the client is passing the correct information to the server using <?php echo $_SERVER['REMOTE_USER']; ?> This information is also correct. It is in the format DOMAIN\Username.
I can duplicate this on both a clean 1.12 install and the 1.9 upgrade install. Both servers are Windows Server Datacenter 2019 Core and IIS 10 with rewrite module. MySQL is version 5.7. PHP versions 7.2.18 & 7.3.5 (64-bit) both give the same error. AD and HTTP Passthru plugins are the latest available on the ost website. And I verified that http passthru is enabled to authenticate clients and staff users. It works perfectly for the staff users when they go to the SCP page but clients give this error as soon as they click the open ticket button on the home landing page.
I should also add that our AD usernames are all numeric. (and yes I fixed the staff side logins with GreezyBacon's fix 2393 which still works perfectly in 1.12.)
Do I need to make another mod for the clients so that http passthru supports all numeric usernames?
Thanks in advance for any help!