Skip to content

Conversation

@anvox
Copy link
Member

@anvox anvox commented Jun 11, 2020

Remake #196 with a little change in detail.
See comments.

Implement #194

@anvox
Copy link
Member Author

anvox commented Jun 11, 2020

I see #196 inactive for a long time, so I remake.

@coveralls
Copy link

coveralls commented Jun 11, 2020

Pull Request Test Coverage Report for Build 1029

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 0.0%

Totals Coverage Status
Change from base Build 1028: 0.0%
Covered Lines: 0
Relevant Lines: 0

💛 - Coveralls

@coveralls
Copy link

coveralls commented Jun 11, 2020

Pull Request Test Coverage Report for Build 1015

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 0.0%

Totals Coverage Status
Change from base Build 1007: 0%
Covered Lines: 0
Relevant Lines: 0

💛 - Coveralls

# @option opts [FixNum, String] :algorithm (hmac-sha-256) the algorithm to use for the HMAC digest (one of 'hmac-sha-256', 'hmac-sha-1')
def initialize(client, token, secret, opts = {})
@secret = secret
@seq_nr = SecureRandom.random_number(2 ** 64)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sequence numbers fall in the range 0 through 2^64 - 1 and wrap to zero following the value 2^64 - 1.

As SecureRandom.random_number(n) generate number => 0 and < n, we needn'nt minus 1

@pboling
Copy link
Member

pboling commented Jun 26, 2020

@anvox This looks great! This appears to be a breaking change? Would you suggest a minor release, or a major release? How "breaking" is this change?

@pboling pboling mentioned this pull request Jun 26, 2020
@anvox anvox force-pushed the av-update-mac-to-draft-5 branch from 01e8125 to f1150fc Compare June 27, 2020 09:27
@anvox
Copy link
Member Author

anvox commented Jun 27, 2020

@pboling I think it should be a major change. By this change, we no longer support MAC token draft < 3. Clients must change from using nonce to seq-nr make sure servers support seq-nr.

@pboling
Copy link
Member

pboling commented Jun 30, 2020

@anvox ok, this will be a new major release of 2.0.0, and the old major milestones will all get bumped up by +1.0.0

@pboling pboling merged commit 5723ae1 into ruby-oauth:master Jul 22, 2020
@pboling pboling added this to the 2.0.0 milestone Jul 23, 2020
@pboling pboling added the in Changelog Has been added to Changelog label Mar 28, 2022
@stanhu stanhu mentioned this pull request May 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

in Changelog Has been added to Changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants