Skip to content

Conversation

@csware
Copy link
Contributor

@csware csware commented Nov 8, 2025

The IETF draft-linuxgemini-otpauth-uri-02 recommends to not include the padding in Section 3.3.1. cf. https://www.ietf.org/archive/id/draft-linuxgemini-otpauth-uri-02.html#section-3.3.1

The padding specified in [RFC4648] section 3.2 is not required and SHOULD BE omitted.

(fixes issue #12540)

Type of change

  • ✅ Bug fix (non-breaking change that fixes an issue)

@droidmonkey
Copy link
Member

droidmonkey commented Nov 9, 2025

Why make any changes at all? This is a SHOULD not a must. I am not in favor of making s change here. It's also still in draft.

@droidmonkey droidmonkey closed this Nov 9, 2025
@csware
Copy link
Contributor Author

csware commented Nov 9, 2025

Yes, it's only a draft, but that's the be best what we have ATM.

The draft states SHOULD and not MAY (cf. https://datatracker.ietf.org/doc/html/rfc2119):

This word, or the adjective "RECOMMENDED", mean that there may exist valid reasons in particular circumstances to ignore a particular item, but the full implications must be understood and carefully weighed before choosing a different course.

So far there are multiple bug reports that the padding causes issues...

@droidmonkey
Copy link
Member

droidmonkey commented Nov 9, 2025

There is only one and it was ios Google authenticator being dumb.

Ironically there are a few many years ago that resulted in things NOT working because padding was missing. (see here: https://github.com/keepassxreboot/keepassxc/issues?q=sort%3Aupdated-desc%20is%3Aissue%20state%3Aclosed%20totp%20padding)

@droidmonkey
Copy link
Member

At the end of the day, padding only matters in the QRCode display of the otpauth url. There was a suggestion to add a checkbox to that display to remove padding. That should probably be the implementation we go for here. Removing padding on storage of the BASE32 is not a good idea since other KeePass compatible apps might be requiring it.

@csware
Copy link
Contributor Author

csware commented Nov 9, 2025

Removing padding on storage of the BASE32 is not a good idea since other KeePass compatible apps might be requiring it.

The storage is not changed at all, the padding is just not included in the otpauth URI as recommended by the RFC draft.

@droidmonkey
Copy link
Member

I will mull this over

@droidmonkey droidmonkey reopened this Nov 9, 2025
@csware csware marked this pull request as draft November 9, 2025 15:50
The IETF draft-linuxgemini-otpauth-uri-02 recommends to not include the padding in Section 3.3.1.
cf. https://www.ietf.org/archive/id/draft-linuxgemini-otpauth-uri-02.html#section-3.3.1

(fixes issue keepassxreboot#12540)

Signed-off-by: Sven Strickroth <email@cs-ware.de>
@csware csware marked this pull request as ready for review November 10, 2025 10:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants