Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

decrypt_file doesn't work with spaces in output parameter #136

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions gnupg/_parsers.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
from ordereddict import OrderedDict

import re
import shlex

from . import _util
from ._util import log
Expand Down Expand Up @@ -306,7 +307,7 @@ def _check_option(arg, value):
checked += (flag + ' ')

if _is_string(value):
values = value.split(' ')
values = shlex.split(value)
for v in values:
## these can be handled separately, without _fix_unsafe(),
## because they are only allowed if they pass the regex
Expand Down Expand Up @@ -372,7 +373,7 @@ def _check_option(arg, value):
is_flag = lambda x: x.startswith('--')

def _make_filo(args_string):
filo = arg.split(' ')
filo = re.findall(r'(?:[^\s,"]|"(?:\\.|[^"])*")+', args_string)
filo.reverse()
log.debug("_make_filo(): Converted to reverse list: %s" % filo)
return filo
Expand Down