On Thu, Jun 25, 2020 at 06:39:27AM -0700, Kevin J. McCarthy wrote:
On Wed, Jun 24, 2020 at 09:43:51PM -0500, Alexander Perlis wrote:
As for increasing the variable expansion limit: if I follow the parsing code correctly, it mostly uses the BUFFER type, but parse_set() calls mutt_extract_token() which for variable expansion uses a local stack-based LONG_STRING (1024 bytes) to receive the value, and calls var_to_string(), which constructs the value inside another local stack-based LONG_STRING. Could these be changed to HUGE_STRING (8192 bytes)? This would allow for longer variable expansions, sufficient for what I was trying to do with my OAuth2 token parameter.

I've been working on removing HUGE_STRING stack usages, so although this is possible I'd rather just convert it to use the buffer pool. I'll try to do that today.

For right now, I would suggest you use a $my_ variable to store the value, and assign to the various oauth_refresh_command using that $my_ variable. That should neither truncate nor escape the contents.

I have a patch for regular config variables to use a buffer, but the patch also removes escaping for the extract_token case. I'm going to run that by the other devs in another thread before committing it.

--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA

Attachment: signature.asc
Description: PGP signature

Reply via email to