Skip to content

secret with spaces are not encoded properly #190

@jrbalderrama

Description

@jrbalderrama

Services like gitlab or firefox provides the secret key in the format "XXXX XXXX XXXX XXXX XXXX XXXX XXXX XXXX" (group of chars separated by spaces). Currently, the pass-otp does not support this kind of key because it is not possible to insert a URI with spaces. Nevertheless, that key format is compatible with oathtool if you provide it between quotation marks:

$ oathtool -b --totp=SHA1 "XXXX XXXX XXXX XXXX XXXX XXXX XXXX XXXX"

A solution might be to encode the URI replacing the spaces with %20 and decode the key before processing internally on pass-otp. In order to accomplish the code generation, the oathtool execution must encapsulate the decode key between the quotes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions