tadfisher / pass-otp

A pass extension for managing one-time-password (OTP) tokens
GNU General Public License v3.0
1.3k stars 86 forks source link

[#144] handle otpauth URLs with server port numbers #153

Closed runejuhl closed 2 years ago

runejuhl commented 2 years ago

This fixes pass-otp not being able to handle OTP URL with a HTTP port numbers embedded, by slightly rewriting the regex used for taking the OTP URL apart.

URLs with port numbers would otherwise cause errors like the following:

Cannot parse OTP key URI:
otpauth://totp/some.domain.com:username@some.domain.com:443?secret=ABCDEF
KlavsKlavsen commented 2 years ago

This would be REALLY nice to get merged

tadfisher commented 2 years ago

Unfortunately this breaks some test cases in insert.t, as the regex prevents parsing the account name in all cases. I've continued this in #158 which appears to solve the underlying issue.