Bubka / 2FAuth

A Web app to manage your Two-Factor Authentication (2FA) accounts and generate their security codes
https://docs.2fauth.app/
GNU Affero General Public License v3.0
2.08k stars 139 forks source link

Import from GA via live scan: LABEL MUST NOT CONTAIN A COLON.= #375

Open s-scheurer opened 3 weeks ago

s-scheurer commented 3 weeks ago

Version

5.2.0

Details & Steps to reproduce

When importing Microsoft entries (always starting with Microsoft:) from Google Authenticator on Android via live scan function the entries show up with the error message "LABEL MUST NOT CONTAIN A COLON.=" and can not be imported.

Expectation

A colon in the label not breaking the import.

Error & Logs

No response

Execution environment

No response

Containerization

Additional information

No response

Bubka commented 2 weeks ago

Hi, The QR code contains a string formatted according to the otpauth uri format. One of the format rules is:

The issuer prefix and account name should be separated by a literal or url-encoded colon, and optional spaces may precede the account name. Neither issuer nor account name may themselves contain a colon

Last time this issue was reported (see #234) it shows that Microsoft uses this colon to identify the company name when the 2FA protects a professional account:

Microsoft:CompanyName:Firstname.Lastname@company.com

Microsoft does not respect the otpauth format, it's why it's rejected by 2FAuth.

Here is a workaround: