Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

auth-ldap not able to search directory #3544

Closed
GCornman opened this issue Dec 3, 2016 · 2 comments
Closed

auth-ldap not able to search directory #3544

GCornman opened this issue Dec 3, 2016 · 2 comments

Comments

@GCornman
Copy link

GCornman commented Dec 3, 2016

Hi, I'm working on a new installation of osTicket v1.10 and found an issue with the current version of the auth-ldap plugin, v0.6.3. In the new ticket screen, the LDAP plugin doesn't return any results for remote users. I get this error in my Apache log:

[Fri Dec 02 16:19:47 2016] [error] [client x.x.x.x] PHP Fatal error:  Uncaught exception 'OrmException' with message 'Union queries must have matching values counts' in /var/www/html/osticket/include/class.orm.php:1283
Stack trace:
#0 /var/www/html/osticket/include/ajax.users.php(90): QuerySet->union(Object(QuerySet))
#1 [internal function]: UsersAjaxAPI->search()
#2 /var/www/html/osticket/include/class.dispatcher.php(145): call_user_func_array(Array, Array)
#3 /var/www/html/osticket/include/class.dispatcher.php(38): UrlMatcher->dispatch(false, Array)
#4 /var/www/html/osticket/include/class.dispatcher.php(120): Dispatcher->resolve(false, Array)
#5 /var/www/html/osticket/include/class.dispatcher.php(38): UrlMatcher->dispatch('/users', NULL)
#6 /var/www/html/osticket/scp/ajax.php(262): Dispatcher->resolve('/users')
#7 {main}
  thrown in /var/www/html/osticket/include/class.orm.php on line 1283, referer: http://svvm-helpdesk/osticket/scp/tickets.php?a=open

I found somebody else with a similar error here: osTicket/osTicket-plugins#105

I was able to comment out the offending block of code in ajax.users.php from lines 84-91 and now my LDAP search does return results, albeit there are duplicates if a local user already exists. I didn't have time to chase it any further. I'm hoping someone more familiar with this code will be able to fix it properly and quickly.

@ntozier
Copy link
Contributor

ntozier commented Dec 3, 2016

Try this?

#3456

@GCornman
Copy link
Author

GCornman commented Dec 5, 2016

Turns out my duplicate results were from a case mismatch. If the case matches, the duplicate results do get filtered and there's no difference between my solution of removing the entire block and the solution in #3456 of removing only the one line. I'll close this since it appears the other one fixes the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants