Bug 4587

Summary: POPBUFSIZE too small for some OAUTH tokens
Product: Claws Mail Reporter: M <thewildbeast>
Component: OAuth2Assignee: users
Status: CLOSED FIXED    
Severity: normal    
Priority: P3    
Version: 4.1.0   
Hardware: PC   
OS: Linux   
Attachments: Increase POPBUFSIZE and check for overflow

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.