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

Wrong Error message for U2F Error code 4. #14130

Closed
My1 opened this issue Mar 27, 2018 · 5 comments
Closed

Wrong Error message for U2F Error code 4. #14130

My1 opened this issue Mar 27, 2018 · 5 comments
Assignees
Labels
Bug A problem or regression with an existing feature good first issue has-pr An issue that has a pull request pending that may fix this issue. The pull request may be incomplete newbie ui Issues relating to the user interface
Projects
Milestone

Comments

@My1
Copy link

My1 commented Mar 27, 2018

Steps to reproduce

  1. have 2 different U2F devices ready
  2. set one of them as 2FA for the account.
  3. try to log in
  4. use THE OTHER U2F Device.

Expected behaviour

Error Message 4 saying that the stick used is unknown to this account

Actual behaviour

Error message 4 saying "Failed security key activation (4)."

Reason

Error Message 4 works differently for Registration and Login as described here:
https://developers.yubico.com/U2F/Libraries/Client_error_codes.html

For Registration: the key is already used.
For Login: the key is unknown.

Server configuration

Operating system: Win 8.1 Pro x64

Web server: Caddy 0.10.11

Database: MySQL 5.6.21

PHP version: 7.2.0

phpMyAdmin version: 4.8 RC1

Client configuration

Browser: Opera 52

Operating system: Win 8.1 Pro x64

@williamdes williamdes changed the title [4.8 RC1] Wrong Error message for U2F Error code 4. Wrong Error message for U2F Error code 4. Oct 28, 2018
@williamdes williamdes added the ui Issues relating to the user interface label Oct 28, 2018
@williamdes williamdes added this to Triage zone in Enhancements Jan 23, 2020
@williamdes williamdes added the Bug A problem or regression with an existing feature label Jan 24, 2020
@williamdes williamdes removed this from Triage zone in Enhancements Jan 24, 2020
@williamdes williamdes added this to Needs triage in issues via automation Jan 24, 2020
@williamdes williamdes moved this from Needs triage to to be fixed soon in issues Jan 24, 2020
@williamdes
Copy link
Member

can U2F keys be emulated ?

@My1
Copy link
Author

My1 commented Jan 24, 2020

in theory yes. I dont know how though although there are a few of them which are VERY cheap.

@williamdes
Copy link
Member

I added this to 5.2, it is a quick fix from what I see and the message is not "wrong" but from the code I can see we could implement more specific error codes than just error code 5

phpmyadmin/js/src/u2f.js

Lines 14 to 20 in 287d743

if (data.errorCode === 5) {
Functions.ajaxShowMessage(Messages.strU2FTimeout, false);
} else {
Functions.ajaxShowMessage(
Functions.sprintf(Messages.strU2FError, data.errorCode), false
);
}

@quinnzipse
Copy link
Contributor

Hi! I'm looking to make my first contribution to an open source project! Is there some way I can help with this issue?

@williamdes
Copy link
Member

williamdes commented Mar 30, 2021

Hi! I'm looking to make my first contribution to an open source project! Is there some way I can help with this issue?

Hi @quinnzipse
You can work on this issue on QA_5_1 branch. You will need to add a case to the script above and add a Messages. string

Let me know if you need help

@williamdes williamdes added the has-pr An issue that has a pull request pending that may fix this issue. The pull request may be incomplete label May 12, 2021
@williamdes williamdes modified the milestones: 5.2.0, 5.1.1 May 14, 2021
@MauricioFauth MauricioFauth self-assigned this May 28, 2021
williamdes added a commit that referenced this issue May 28, 2021
Signed-off-by: William Desportes <williamdes@wdes.fr>
issues automation moved this from to be fixed soon to Closed May 28, 2021
williamdes added a commit that referenced this issue May 29, 2021


Signed-off-by: William Desportes <williamdes@wdes.fr>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug A problem or regression with an existing feature good first issue has-pr An issue that has a pull request pending that may fix this issue. The pull request may be incomplete newbie ui Issues relating to the user interface
Projects
issues
  
Closed
Development

No branches or pull requests

4 participants