Skip to content

gen_ssha_password cannot handle unicode passwords #1

@msghens

Description

@msghens

File "./pyJMSHTML2.py", line 287, in
main()
File "./pyJMSHTML2.py", line 277, in main
run_stomp()
File "./pyJMSHTML2.py", line 203, in run_stomp
personRecord['ssha_password'] = gen_ssha_password(imsperson.password)
File "./pyJMSHTML2.py", line 84, in gen_ssha_password
final_hashed_pw = "{SSHA}%s" % base64.b64encode(gen_digested_password(password,salt)+salt)
File "./pyJMSHTML2.py", line 93, in gen_digested_password
return hashlib.sha1('%s%s'%(pw,salt)).hexdigest()
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe4' in position 4: ordinal not in range(128)

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions