Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix 'RemoteYubikeyDevice' object has no attribute 'throttle_reset' #713

Merged
merged 2 commits into from
May 24, 2024

Conversation

moggers87
Copy link
Collaborator

@moggers87 moggers87 commented Mar 15, 2024

Description

This PR contains a fix and tests for using the remember me feature with any device that doesn't implement throttle_increase and throttle_reset. This includes RemoteYubikeyDevice.

Motivation and Context

As noted in #699 it is very similar to #397. We should not assume every Device implements throttle_increaseandthrottle_reset`

How Has This Been Tested?

I don't own a YubiKey, so testing will rely solely on unit tests.

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Copy link

codecov bot commented Mar 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.86%. Comparing base (de33a6d) to head (25e5e5d).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #713      +/-   ##
==========================================
+ Coverage   97.84%   97.86%   +0.02%     
==========================================
  Files          78       78              
  Lines        3390     3423      +33     
  Branches      384      391       +7     
==========================================
+ Hits         3317     3350      +33     
  Misses         42       42              
  Partials       31       31              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@moggers87 moggers87 marked this pull request as ready for review March 24, 2024 16:06
@moggers87
Copy link
Collaborator Author

Hi @ValentinS33 I was wondering if you would be able to test this PR out as you have presumably have access to a Yubi key device?

@kevindice
Copy link
Contributor

Hi @moggers87 I'd be happy to test. I've got a couple keys. Reviewing the linked issues above to see how to repro

@kevindice
Copy link
Contributor

kevindice commented Apr 28, 2024

Tested - works great, thank you.

Edit: running Django==5.0.4 as well

@moggers87 moggers87 merged commit 2611ef5 into jazzband:master May 24, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants