Bug 4587 - POPBUFSIZE too small for some OAUTH tokens
Summary: POPBUFSIZE too small for some OAUTH tokens
Status: CLOSED FIXED
Alias: None
Product: Claws Mail
Classification: Unclassified
Component: OAuth2 (show other bugs)
Version: 4.1.0
Hardware: PC Linux
: P3 normal
Assignee: users
URL:
Depends on:
Blocks:
 
Reported: 2022-04-13 16:09 UTC by M
Modified: 2022-11-19 01:30 UTC (History)
0 users

See Also:


Attachments
Increase POPBUFSIZE and check for overflow (1.18 KB, patch)
2022-04-13 16:09 UTC, M
Details | Diff

Description M 2022-04-13 16:09:42 UTC
Created attachment 2282 [details]
Increase POPBUFSIZE and check for overflow

I recently needed to use Microsoft Exchange, and followed the very helpful instructions at https://www.claws-mail.org/faq/index.php/Oauth2 . One of the issues I encountered was that the Oauth2 access tokens used can be larger than one of the buffers used to store them. The largest token size I saw was 3636 bytes, but pop3_gen_send silently truncates these tokens to POPBUFSIZE=512 bytes .

I've attached the patch that I use to increase POPBUFSIZE and warn when there is an overflow.
Comment 1 M 2022-11-19 01:30:04 UTC
Fixed by 15f792b7ecc27a055afe119bb3caf812fdeada79.

Note You need to log in before you can comment on or make changes to this bug.