core: Don't split gpgconf strings on comma

Authored by aheinecke on Apr 5 2017, 5:05 PM.


  • src/engine-gpgconf.c (gpgconf_parse_option): Don't split strings on comma.

    -- This only affects values where the main type is string. Values with the alt_type string but another main type are still split to keep lists (e.g. groups) working.
Test Plan

Checked with t-gpgconf that a group value is still a list and the default_pubkey_algo is ok

Diff Detail

No Linters Available
No Unit Test Coverage
aheinecke created this revision.Apr 5 2017, 5:05 PM
werner added a comment.Apr 5 2017, 5:23 PM

Changing gpg or gpgconf is wrong. A string list is indicated by flag value 2 which is not set for that option and thus we do not have a string list.

There might be a bug in gpgme, though.

aheinecke updated this revision to Diff 1248.Apr 5 2017, 5:28 PM

Update diff with arcanist

Maybe this fixes that no context is shown in the diff

werner added a comment.Apr 5 2017, 5:35 PM

Still wrong package. You need to address this in gpgme/src/engine-gpgconf.c.
Minor correction: the value of the flag is 1^2.

werner requested changes to this revision.Apr 5 2017, 5:44 PM
werner edited projects, added gpgme; removed gnupg.

I guess I should do this.

This revision now requires changes to proceed.Apr 5 2017, 5:45 PM
aheinecke updated this revision to Diff 1249.Apr 5 2017, 6:26 PM

Patch now fixes the problem in gpgme

aheinecke retitled this revision from gpg: Escape commas in default_pubkey_algo to core: Don't split gpgconf strings on comma.Apr 5 2017, 6:40 PM
aheinecke edited the summary of this revision. (Show Details)
aheinecke edited the test plan for this revision. (Show Details)

Ping. Is this patch ok? I'm pretty sure it is and I've included it in Gpg4win but before I can push the default_pubkey_algo respecting change to Kleopatra I need this to work in GPGME.

aheinecke abandoned this revision.May 10 2017, 10:34 AM

I've accidentally pushed this commit. But I'm very sure it's Ok anyway and pretty trivial. And it's been over a month to object. I really need this patch to get keygen working with default_pubkey_algo in kleopatra. It was also included in the last gpg4win betas.