Backtrace in custom graphs and utf-8 usernames

Bug #406388 reported by Andreas Hasenack
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Landscape Client
Fix Released
Medium
Thomas Herve

Bug Description

==> /var/log/landscape/manager.log <==
2009-07-28 10:52:18,309 ERROR [MainThread] Error running message handler for type 'custom-graph-add': <bound method CustomGraphPlugin._handle_custom_graph_add of <landscape.manager.customgraph.CustomGraphPlugin object at 0x7fd7a12d1410>>
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/landscape/plugin.py", line 73, in dispatch_message
    return handler(message)
  File "/usr/lib/python2.6/dist-packages/landscape/manager/customgraph.py", line 128, in _handle_custom_graph_add
    uid, gid = get_user_info(user)[:2]
  File "/usr/lib/python2.6/dist-packages/landscape/manager/scriptexecution.py", line 38, in get_user_info
    info = pwd.getpwnam(username)
UnicodeEncodeError: 'ascii' codec can't encode characters in position 1-2: ordinal not in range(128)

The username in this case was "fóóbãr". Ok, a fake one, but it illustrates the point.

Tags: karmic-issue
Changed in landscape-client:
importance: Undecided → Medium
milestone: none → 1.3.5
Thomas Herve (therve)
Changed in landscape-client:
assignee: nobody → Thomas Herve (therve)
status: New → In Progress
Revision history for this message
Thomas Herve (therve) wrote :

The change for the unicode problem is fairly isolated. There was another problem for reporting missing user error to the server, which should be fixed now.

tags: added: review
Revision history for this message
Jamu Kakar (jkakar) wrote :

Looks good, +1!

Revision history for this message
Kevin McDermott (bigkevmcd) wrote :

One of my suggestions for the "Review guidelines" was going to be "Are there any Unicode holes?" :-)

+1 from me :-)

tags: removed: review
Revision history for this message
Thomas Herve (therve) wrote :

Thanks, merged in r141.

Changed in landscape-client:
status: In Progress → Fix Committed
tags: added: needs-testing
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Ok, no backtrace anymore.

tags: removed: needs-testing
Changed in landscape-client:
status: Fix Committed → Fix Released
Jamu Kakar (jkakar)
tags: added: karmic-issue
Changed in landscape-client:
status: Fix Released → Fix Committed
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Confirmed the fix is in the karmic package 1.3.2.4-0ubuntu0.9.10.0~landscape1, qa + 1

Changed in landscape-client:
status: Fix Committed → Fix Released
Changed in landscape-client:
status: Fix Released → Fix Committed
milestone: 1.3.5 → 1.4.2
tags: added: needs-testing
Revision history for this message
Kevin McDermott (bigkevmcd) wrote :

Works for me!

tags: removed: needs-testing
Changed in landscape-client:
status: Fix Committed → Fix Released
Changed in landscape-client:
status: Fix Released → Fix Committed
David Britton (dpb)
Changed in landscape-client:
status: Fix Committed → Fix Released
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.