1
0
Fork 0
mirror of https://github.com/nishiki/manage-password.git synced 2024-10-27 02:33:19 +00:00

fix bug in otp generator

This commit is contained in:
Adrien Waksberg 2017-07-30 22:30:15 +02:00
parent 11de55ccb7
commit d185509113
4 changed files with 7 additions and 3 deletions

View file

@ -1,4 +1,8 @@
# CHANGELOG # CHANGELOG
## v4.2.1 (2017-07-30)
* fix bug in otp generator
## v4.2.0 (2017-06-06) ## v4.2.0 (2017-06-06)
* feat: improve the interface * feat: improve the interface

View file

@ -1,5 +1,5 @@
# MPW: Manage your passwords! # MPW: Manage your passwords!
[![Version](https://img.shields.io/badge/latest_version-4.2.0-green.svg)](https://github.com/nishiki/manage-password/releases) [![Version](https://img.shields.io/badge/latest_version-4.2.1-green.svg)](https://github.com/nishiki/manage-password/releases)
[![Build Status](https://travis-ci.org/nishiki/manage-password.svg?branch=master)](https://travis-ci.org/nishiki/manage-password) [![Build Status](https://travis-ci.org/nishiki/manage-password.svg?branch=master)](https://travis-ci.org/nishiki/manage-password)
[![License](https://img.shields.io/badge/license-GPL--2.0-blue.svg)](https://github.com/nishiki/manage-password/blob/master/LICENSE) [![License](https://img.shields.io/badge/license-GPL--2.0-blue.svg)](https://github.com/nishiki/manage-password/blob/master/LICENSE)

View file

@ -1 +1 @@
4.2.0 4.2.1

View file

@ -272,7 +272,7 @@ module MPW
# @param id [String] the item id # @param id [String] the item id
# @return [String] an otp code # @return [String] an otp code
def get_otp_code(id) def get_otp_code(id)
@otp_keys.key?(id) ? 0 : ROTP::TOTP.new(decrypt(@otp_keys[id])).now @otp_keys.key?(id) ? ROTP::TOTP.new(decrypt(@otp_keys[id])).now : 0
end end
# Get remaining time before expire otp code # Get remaining time before expire otp code