zope.app.component.vocabulary.UtilityNames getTermByToken can never find a term by token

Bug #99408 reported by Gabi Shaar
2
Affects Status Importance Assigned to Milestone
Zope 3
Status tracked in 3.4
3.4
Fix Released
High
Christian Theune

Bug Description

zope.app.component.vocabulary :
in UtilityNameTerm the token is built as following :

"t" + self.value.encode('utf-8').encode('base64')[:-1]

but in UtilityNames.getTermByToken, it tried to look up the term as following :

name.encode('utf-8').encode('base64')[:-1] == token

ignoring the added "t".

Revision history for this message
Christian Theune (ctheune) wrote :

You're right. There was quite a bit of code-duplication in this place. I've fixed this. Thanks for the heads-up.

Changed in zope3:
assignee: nobody → ct-gocept
importance: Undecided → High
status: Unconfirmed → Fix Committed
Revision history for this message
Philipp von Weitershausen (philikon) wrote :

We've had two betas since this fix has been committed, therefore setting status to 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.