forked from pool/fetchmail
Pedro Monreal Gonzalez
fe4b96277c
- Backported support for OAUTH2 authentication from Fetchmail 7.0. - add imap oauthbearer support - support oauthbearer/xoauth2 with pop3 - add passwordfile and passwordfd options - add contrib/fetchnmail-oauth2.py token acquisition utility - FAQ: list gmail options including oauthbearer and app password - give each ctl it's own copy of password - re-read passwordfile on every poll - add query_to64_outsize() utility function - Chase and integrate interface change. - oauth2.c: calculate and pass in correct buffer size to to64frombits() - Increase max password length to handle oauth tokens - Bump max. passwordlen to 10000 bytes. - Add README.OAUTH2 - Added patches: * fetchmail-add-imap-oauthbearer-support.patch * fetchmail-support-oauthbearer-xoauth2-with-pop3.patch * fetchmail-add-passwordfile-and-passwordfd-options.patch * fetchmail-add-contrib-fetchnmail-oauth2.py-token-acquisition-u.patch * fetchmail-FAQ-list-gmail-options-including-oauthbearer-and-app.patch * fetchmail-give-each-ctl-it-s-own-copy-of-password.patch * fetchmail-re-read-passwordfile-on-every-poll.patch * fetchmail-add-query_to64_outsize-utility-function.patch * fetchmail-chase-and-integrate-interface-change.patch * fetchmail-oauth2-c-calculate-and-pass-in-correct-buffer-size-to-to64frombits.patch * fetchmail-increase-max-password-length-to-handle-oauth-tokens.patch * fetchmail-bump-max-passwordlen-to-1bytes.patch * fetchmail-add-readme-oauth2-issue-27.patch OBS-URL: https://build.opensuse.org/request/show/892934 OBS-URL: https://build.opensuse.org/package/show/server:mail/fetchmail?expand=0&rev=113
34 lines
1.2 KiB
Diff
34 lines
1.2 KiB
Diff
From: =?utf-8?q?Martin_Sj=C3=B6lund_=3Cmartin=40sjoelund=2Ese=3E?=
|
|
Date: Thu, 17 Dec 2020 09:09:44 +0100
|
|
Subject: Increase max password length to handle oauth tokens
|
|
Git-repo: https://gitlab.com/fetchmail/fetchmail.git
|
|
Git-commit: 6e877b5d92527ad501aaef46e37704b51db316fb
|
|
|
|
The maximum length of oauth2 access tokens is unbounded.
|
|
* Google uses 2048 byte access tokens and "Google reserves the right
|
|
to change token size within these limits, and your application
|
|
must support variable token sizes accordingly."
|
|
* My Office365 access token is 2108 bytes long.
|
|
* Intuit says you must support 4096 byte access tokens.
|
|
|
|
This simply patches the hard-coded limit to 4096 bytes, but it might
|
|
not be sufficient.
|
|
---
|
|
fetchmail.h | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/fetchmail.h b/fetchmail.h
|
|
index bebb094d..6ff23919 100644
|
|
--- a/fetchmail.h
|
|
+++ b/fetchmail.h
|
|
@@ -104,7 +104,7 @@ enum authenticators {
|
|
|
|
#define NAMELEN 64 /* max username length */
|
|
/* oauth2 access tokens seem to be about 130 characters; make this longer: */
|
|
-#define PASSWORDLEN 256 /* max password length */
|
|
+#define PASSWORDLEN 4096 /* max password length; oauth2 tokens have no maximum length */
|
|
#define DIGESTLEN 33 /* length of MD5 digest */
|
|
|
|
/* exit code values */
|
|
|