nextcloud / nextcloud/twofactor_webauthn
Only display « Migrating devices of user » for users who actually have u2f keys in migration
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 59
- Forks
- 11
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 16
Description
Steps to reproduce
- Have a lot of users
- Execute
php occ twofactor_webauthn:migrate-u2f --all
Expected behaviour
The message Migrating devices of user X should only be displayed for users with actual u2f keys registered.
Actual behaviour
The message is displayed for all users, even if they don't have any registered u2f keys to migrate
Fix
An easy fix is to make sure the following line only executes if count($registrations) > 0.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Open lib/Command/MigrateU2F.php at the referenced line and inspect how registrations are collected in the twofactor_webauthn:migrate-u2f command. Ensure the migration message is only shown when registrations contain at least one key, then verify that users without registered U2F keys produce no message.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- authentication, cli
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 72/100