rotp 6.2.1 → 6.2.2

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of rotp might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9ecb2247634bd68cca10dc441b74ee72ac9f5da864d87741458b1217504a998e
4
- data.tar.gz: 966a044c680040ae627edd5bc12b0b2e7fb0f8e6c6b1bab2c869d505734cd267
3
+ metadata.gz: 4ce425976dcf66314bf7217e6c5901c8e4cfd54d78919c058052ec2fc1d8c336
4
+ data.tar.gz: 6d0c496074dbe1d6d625e26b0408e33585c9783661077f322e7aa4c3585442c8
5
5
  SHA512:
6
- metadata.gz: 2d331d941f4a81957800ee7e9fc3b5c34f85bbcbc10b6eac0c27ea42948eeea0ee491f01d1eec999adf132281087abd616bd3f6e0dc60c684cc2999c3df3205e
7
- data.tar.gz: efa2b84c25f7f74661dce4943808419cc46a2ff19157dc7f254ee56a329b097f01c4598aa0dd7dba4cba9cb0bbc81e53fed297b1abaf5309e7f46ee3809761e8
6
+ metadata.gz: f4d739d3cc3fed5ec4cdcd04b6c73b8fa30cfdc513d92f4e8c1130f45682b2aa37cd2029f66522c0648a8a8d3a905556e1ac1b42715f6ef6f2e95716dd010422
7
+ data.tar.gz: ada9184523ddc259caabedb7429704d7a952b19faf067dbdc6a65d29dbdb57f3ad4a0e4a9e9b07268518f6f239190882b0f9cfc60b39264f7b79b381566c436c
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  ### Changelog
2
2
 
3
+ ### 6.2.2
4
+
5
+ - Removed `rjust` from `generate_otp` in favor of more time constant version
6
+
3
7
  ### 6.2.1
4
8
 
5
9
  - Removed old rdoc folder that was triggering a security warning due to an
data/lib/rotp/otp.rb CHANGED
@@ -32,7 +32,8 @@ module ROTP
32
32
  (hmac[offset + 1].ord & 0xff) << 16 |
33
33
  (hmac[offset + 2].ord & 0xff) << 8 |
34
34
  (hmac[offset + 3].ord & 0xff)
35
- (code % 10**digits).to_s.rjust(digits, '0')
35
+ code_str = (10 ** digits + (code % 10 ** digits)).to_s
36
+ code_str[-digits..-1]
36
37
  end
37
38
 
38
39
  private
data/lib/rotp/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module ROTP
2
- VERSION = '6.2.1'.freeze
2
+ VERSION = '6.2.2'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rotp
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.2.1
4
+ version: 6.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mark Percival
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-11-11 00:00:00.000000000 Z
11
+ date: 2022-12-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -125,7 +125,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
125
125
  - !ruby/object:Gem::Version
126
126
  version: '0'
127
127
  requirements: []
128
- rubygems_version: 3.3.7
128
+ rubygems_version: 3.3.26
129
129
  signing_key:
130
130
  specification_version: 4
131
131
  summary: A Ruby library for generating and verifying one time passwords