Unicode passwords are not supported

Bug #409343 reported by Hosam Aly
20
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Server (MOVED TO GITHUB)
Fix Released
Undecided
sme (OpenERP)

Bug Description

OpenERP Server 5.0.1 - Python 2.5.4

Login with a password that contains any characters outside the 7-bit ASCII range causes a UnicodeDecodeError.

Traceback (most recent call last):
  File "openerp-server/netsvc.py", line 235, in dispatch
    result = LocalService(service_name)(method, *params)
  File "openerp-server/netsvc.py", line 74, in __call__
    return getattr(self, method)(*params)
  File "openerp-server/service/web_services.py", line 385, in login
    res = security.login(db, login, password)
  File "openerp-server/service/security.py", line 30, in login
    cr.execute('select id from res_users where login=%s and password=%s and active', (login.encode('utf-8'), password.encode('utf-8')))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xd8 in position 0: ordinal not in range(128)

Related branches

Revision history for this message
Raphaël Valyi - http://www.akretion.com (rvalyi) wrote :

Hello, I would flag this one as a whishlist (low priority), I don't think that's such an important feature, any though?

Revision history for this message
Hosam Aly (hosamaly) wrote :

It's a bug, not a feature. I agree it's low priority, but I think it should be relatively very easy to fix, unless it affects many other pieces of code, in which case it's probably higher priority.

By the way, I noticed this bug when it caused bug #409334, so fixing it can provide a workaround for part of the other bug.

Changed in openobject-server:
assignee: nobody → ssi(Tiny/Axelor) (ssi)
sme (OpenERP) (sme-tiny)
Changed in openobject-server:
assignee: ssi(Tiny/Axelor) (ssi) → sme(Tiny/Axelor) (sme.tiny.axelor)
status: New → Confirmed
Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) wrote :

Hello Hosam Aly,

Fixed in revision 1832 <email address hidden> on Server.

Can you please update your code and check ? Please notify us.
Thank you for reporting.

Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) wrote :

Here is the patch attached for your easiness.

Changed in openobject-server:
status: Confirmed → Fix Released
Revision history for this message
Hosam Aly (hosamaly) wrote :

Thanks a lot. This fixed the issue.

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

Duplicates of this bug

Other bug subscribers

Bug attachments

Remote bug watches

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