1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-13 19:18:56 +00:00

client: only normalize passphrase if not entered on device

This commit is contained in:
matejcik 2018-12-17 13:58:33 +01:00
parent 831fde9c5c
commit cf9106ff5d
2 changed files with 9 additions and 4 deletions

View File

@ -5,6 +5,11 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
_At the moment, the project does __not__ adhere to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). That is expected to change with version 1.0._
## [0.11.1] - unreleased
[0.11.1]: https://github.com/trezor/python-trezor/compare/v0.11.0...master
### Fixed
- crash when entering passphrase on device with Trezor T
## [0.11.0] - 2018-12-06
[0.11.0]: https://github.com/trezor/python-trezor/compare/v0.10.2...v0.11.0

View File

@ -141,10 +141,10 @@ class TrezorClient:
self.call_raw(messages.Cancel())
raise
passphrase = Mnemonic.normalize_string(passphrase)
if len(passphrase) > MAX_PASSPHRASE_LENGTH:
self.call_raw(messages.Cancel())
raise ValueError("Passphrase too long")
passphrase = Mnemonic.normalize_string(passphrase)
if len(passphrase) > MAX_PASSPHRASE_LENGTH:
self.call_raw(messages.Cancel())
raise ValueError("Passphrase too long")
resp = self.call_raw(messages.PassphraseAck(passphrase=passphrase))
if isinstance(resp, messages.PassphraseStateRequest):