Schooltool crashes if ldap user has non-ascii characters in their names

Bug #1277518 reported by Samuli Valavuo
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SchoolTool LDAP
Fix Released
Critical
Gediminas Paulauskas

Bug Description

I'm trying to implement SchoolTool with zentyal for my kids school.
This is testing environment at the moment because I can't show school staff the demo.

Problem is that teachers have scandic letters in their names (not the user id).

Trace:
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 220, 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 370, in getPrincipal
  ldap_person.update()
File "/usr/lib/python2.7/dist-packages/schooltool/ldap/security.py", line 476, in update
  super(LDAPPerson, self).update()
File "/usr/lib/python2.7/dist-packages/schooltool/ldap/security.py", line 462, in update
  part.update()
File "/usr/lib/python2.7/dist-packages/schooltool/ldap/security.py", line 639, in update
  super(PersonLDAPInetOrgPersonPart, self).update()
File "/usr/lib/python2.7/dist-packages/schooltool/ldap/security.py", line 600, in update
  super(PersonLDAPOrganizationalPersonPart, self).update()
File "/usr/lib/python2.7/dist-packages/schooltool/ldap/security.py", line 574, in update
  'first_name': self.oneline(self.data.cn),
File "/usr/lib/python2.7/dist-packages/schooltool/ldap/security.py", line 569, in oneline
  return t and (u' '.join(t)).strip() or u''

Name in zentyal ldap is "Nina Mäkelä"

I can change that name to Makela, but then every other aplication shows that too.

- Samuli

Changed in schooltool:
status: New → Fix Committed
importance: Undecided → Critical
assignee: nobody → Gediminas Paulauskas (menesis)
affects: schooltool → schooltool.ldap
Changed in schooltool.ldap:
assignee: Gediminas Paulauskas (menesis) → nobody
assignee: nobody → Gediminas Paulauskas (menesis)
milestone: none → 1.0.2
Revision history for this message
Gediminas Paulauskas (menesis) wrote :

I have made a 1.0.2 release with a fix for this.

Do you have the SchoolTool PPA enabled and what Ubuntu version are you running?

Changed in schooltool.ldap:
status: Fix Committed → Fix Released
Revision history for this message
Samuli Valavuo (svalavuo) wrote :

Hi,

Just installed trunk PPA today.
I use 12.04 LTS

Revision history for this message
Samuli Valavuo (svalavuo) wrote :

Just ran apt-get upgrade, but 1.0.2 wasn't there

Revision history for this message
Gediminas Paulauskas (menesis) wrote :

The package is still waiting for build, will be there in an hour or so.

But trunk PPA? It is an untested snapshot of development code, that may break any day without warning. You should reinstall from the dev PPA https://launchpad.net/~schooltool-owners/+archive/dev/ before you enter too much data.

It is not possible to downgrade from 2.7.0dev to 2.6.x, but you can export an XLS file (School export), delete ContactRelationships sheet (incompatible format at the moment), and import into a 2.6 instance.

Revision history for this message
Samuli Valavuo (svalavuo) wrote :

I can purge my current installation. There's no content yet.
My system is 64-bit if it has any meaning.

Revision history for this message
Samuli Valavuo (svalavuo) wrote :

Thank You!
Now my setup works.

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.