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

Error: Label must not contain a colon #225

Open
simonsolutions opened this issue Jul 3, 2024 · 2 comments
Open

Error: Label must not contain a colon #225

simonsolutions opened this issue Jul 3, 2024 · 2 comments

Comments

@simonsolutions
Copy link

Version(s) affected

11.3

Description

When setting a Label like this
"Provider%3Ausername%40domain.com"
it throws the error "Label must not contain a colon."

How to reproduce

Setting a Label like this
"Provider%3Ausername%40domain.com"

Possible Solution

Allowing URL Encoded colons.

Other implementations allow it URL encoded. (Microsoft and Google provide them e.g.)

Additional Context

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. Represented in ABNF according to RFC 5234:

label = accountname / issuer (“:” / “%3A”) *”%20” accountname
Valid values might include Example:[email protected], Provider1:Alice%20Smith or Big%20Corporation%3A%20alice%40bigco.com.

@Spomky
Copy link
Member

Spomky commented Jul 3, 2024

Hi,

Many thanks for this report.
Have you considered this: https://github.com/Spomky-Labs/otphp/blob/11.4.x/doc/Customize.md#issuer

@simonsolutions
Copy link
Author

Hi, I've seen the property.
When adding for example a Microsoft365 account, the label is complete including issuer separated by a url encoded colon.
So the idea would be when setting the label splitting it to label and issuer if the colon is present? That would prevent splitting the strings outside the library, maybe with a separate property "isIssuerIncludedInLabel".

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

No branches or pull requests

2 participants