mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-01-03 12:00:59 +00:00
client: only normalize passphrase if not entered on device
This commit is contained in:
parent
831fde9c5c
commit
cf9106ff5d
@ -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._
|
_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] - 2018-12-06
|
||||||
[0.11.0]: https://github.com/trezor/python-trezor/compare/v0.10.2...v0.11.0
|
[0.11.0]: https://github.com/trezor/python-trezor/compare/v0.10.2...v0.11.0
|
||||||
|
@ -141,10 +141,10 @@ class TrezorClient:
|
|||||||
self.call_raw(messages.Cancel())
|
self.call_raw(messages.Cancel())
|
||||||
raise
|
raise
|
||||||
|
|
||||||
passphrase = Mnemonic.normalize_string(passphrase)
|
passphrase = Mnemonic.normalize_string(passphrase)
|
||||||
if len(passphrase) > MAX_PASSPHRASE_LENGTH:
|
if len(passphrase) > MAX_PASSPHRASE_LENGTH:
|
||||||
self.call_raw(messages.Cancel())
|
self.call_raw(messages.Cancel())
|
||||||
raise ValueError("Passphrase too long")
|
raise ValueError("Passphrase too long")
|
||||||
|
|
||||||
resp = self.call_raw(messages.PassphraseAck(passphrase=passphrase))
|
resp = self.call_raw(messages.PassphraseAck(passphrase=passphrase))
|
||||||
if isinstance(resp, messages.PassphraseStateRequest):
|
if isinstance(resp, messages.PassphraseStateRequest):
|
||||||
|
Loading…
Reference in New Issue
Block a user