TypeError after bad LDAP config

Bug #1309235 reported by rmdegennaro
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SchoolTool
New
Undecided
Unassigned

Bug Description

I wasn't paying attention and not even sure what I entered, but I was entering in the webui information for LDAP/SSO.

I get the following when going to the SchoolTool page:

Server Error

An internal server error has occurred. This most likely means that you have found a bug in SchoolTool. Please report it on the issue tracker.

Exception

TypeError: must be string or read-only buffer, not None

Traceback

File "/usr/lib/python2.7/dist-packages/zope/publisher/publish.py", line 129, in publish
  obj = request.traverse(obj)
File "/usr/lib/python2.7/dist-packages/zope/publisher/browser.py", line 540, in traverse
  ob = super(BrowserRequest, self).traverse(obj)
File "/usr/lib/python2.7/dist-packages/zope/publisher/http.py", line 457, in traverse
  ob = super(HTTPRequest, self).traverse(obj)
File "/usr/lib/python2.7/dist-packages/zope/publisher/base.py", line 249, in traverse
  publication.callTraversalHooks(self, obj)
File "/usr/lib/python2.7/dist-packages/zope/app/publication/zopepublication.py", line 137, in callTraversalHooks
  self._maybePlacefullyAuthenticate(request, ob)
File "/usr/lib/python2.7/dist-packages/zope/app/publication/zopepublication.py", line 124, in _maybePlacefullyAuthenticate
  principal = auth.authenticate(request)
File "/usr/lib/python2.7/dist-packages/schooltool/app/security.py", line 221, in authenticate
  return self.authPlugin.authenticate(request)
File "/usr/lib/python2.7/dist-packages/schooltool/ldap/security.py", line 304, in authenticate
  principal = self.getPrincipal('sb.person.' + session['username'])
File "/usr/lib/python2.7/dist-packages/schooltool/ldap/security.py", line 364, in getPrincipal
  results = list(client.find(username))
File "/usr/lib/python2.7/dist-packages/schooltool/ldap/security.py", line 238, in find
  users = self.search(base, scope, filter=filter)
File "/usr/lib/python2.7/dist-packages/schooltool/ldap/security.py", line 149, in search
  self.connect()
File "/usr/lib/python2.7/dist-packages/schooltool/ldap/security.py", line 135, in connect
  new_connection.bind_s(who=dn, cred=password)
File "/usr/lib/python2.7/dist-packages/ldap/ldapobject.py", line 220, in bind_s
  msgid = self.bind(who,cred,method)
File "/usr/lib/python2.7/dist-packages/ldap/ldapobject.py", line 214, in bind
  return self.simple_bind(who,cred)
File "/usr/lib/python2.7/dist-packages/ldap/ldapobject.py", line 200, in simple_bind
  return self._ldap_call(self._l.simple_bind,who,cred,EncodeControlTuples(serverctrls),EncodeControlTuples(clientctrls))
File "/usr/lib/python2.7/dist-packages/ldap/ldapobject.py", line 96, in _ldap_call
  result = func(*args,**kwargs)

Your School - server running SchoolTool 2.1

Revision history for this message
rmdegennaro (rmdegennaro) wrote :

I tried adding this to schooltool.conf & doing a restart:

<ldap_authentication>

  allow_web_config no

</ldap_authentication>

I was hoping to turn off LDAP entirely. But same info on the main page.

Revision history for this message
ma (sundaylll) wrote :

You should be remove the ldap packege such as:
sudo apt-get remove python-schooltool.ldap
then,if you want to use it,you could install it again.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.