philbertphotos / osticket-multildap-auth-plugin

Plugin for OS Ticket that allows for authentication with multiple domains.
GNU General Public License v3.0
28 stars 17 forks source link

User incorrect backend after upgrading to v1.17 #80

Open eamkrc opened 3 months ago

eamkrc commented 3 months ago

Hi, After upgrading osTicket to v1.17 and the plugin to 1.8 new users created by the plugin have an incorrect "backend" set which doesn't allow them to login

+----------------------+--------------------+ | username | backend | +----------------------+--------------------+ .... | ****.* | mldap.client.p16i4 | | ****.* | mldap.client.p16i4 | | ****.* | mldap.client.p16i4 | | ****.* | mldap.client.p16i4 | | ****.* | mldap.client.p16i4 | | ****.* | mldap.client | | ****.* | mldap.client | | ****.* | mldap.client | | ****.* | mldap.client | | ****.* | mldap.client | +--------------------+--------------------+

currently fixing it requires manually going into MariaDB and updating the backend: USE osticket_db; UPDATE ost_user_account SET backend="mldap.client.p16i4" WHERE backend="mldap.client";

Any way to fix this? Best Regards

philbertphotos commented 3 months ago

What is the correct backend value?Its weird that its wrong Sent from my iPhoneOn Apr 4, 2024, at 2:43 AM, Rainer @.**> wrote: Hi, After upgrading osTicket to v1.17 and the plugin to 1.8 new users created by the plugin have an incorrect "backend" set which doesn't allow them to login +----------------------+--------------------+ | username | backend | +----------------------+--------------------+ .... | . | mldap.client.p16i4 | | . | mldap.client.p16i4 | | . | mldap.client.p16i4 | | . | mldap.client.p16i4 | | . | mldap.client.p16i4 | | . | mldap.client | | . | mldap.client | | . | mldap.client | | . | mldap.client | | .* | mldap.client | +--------------------+--------------------+ currently fixing it requires manually going into MariaDB and updating the backend: USE osticket_db; UPDATE ost_user_account SET backend="mldap.client.p16i4" WHERE backend="mldap.client"; Any way to fix this? Best Regards

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: @.***>

eamkrc commented 3 months ago

New users created get "mldap.client" but only are able to login after it's changed to "mldap.client.p16i4"

philbertphotos commented 3 months ago

@eamkrc think I fixed this bug in the newest build that I missed

eamkrc commented 2 months ago

Hey, thanks for the quick reply!

When I tried to login with a new user I got an error page: Existing users login still worked

Fatal error: Uncaught Error: Call to a member function getUser() on bool in /var/www/html/osTicket/include/plugins/multi-ldap/auth.php:806 Stack trace: #0 /var/www/html/osTicket/include/plugins/multi-ldap/auth.php(681): LDAPMultiAuthentication->authOrCreate() #1 /var/www/html/osTicket/include/plugins/multi-ldap/auth.php(994): LDAPMultiAuthentication->authenticate() #2 /var/www/html/osTicket/include/class.auth.php(341): ClientLDAPMultiAuthentication->authenticate() #3 /var/www/html/osTicket/login.php(51): AuthenticationBackend::process() #4 {main} thrown in /var/www/html/osTicket/include/plugins/multi-ldap/auth.php on line 806

philbertphotos commented 2 months ago

@eamkrc i did not realize I was still running 1.17 I will test it on 1.18 and see if I can find a fix.

Coros commented 2 months ago

I'm on osticket 1.18 and logging in to a users created with multi-ldap plugin does not work. New user creation works at the login screen, but logging in a second time fails. The plugin ID and instance are not added to the user_accounts backend field. I've modified a user to mldap.client.p5i4 instead of mldap.client and was able to login as that user.