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

Exceptions raising from error on --pattern regex #84

Closed
marcwebbie opened this issue Jan 28, 2016 · 0 comments
Closed

Exceptions raising from error on --pattern regex #84

marcwebbie opened this issue Jan 28, 2016 · 0 comments
Labels

Comments

@marcwebbie
Copy link
Owner

When adding a credential using a regex pattern, it raises a traceback for errors in the regex.

passpie add foo@example.com --random --pattern "[a-z]{10} [A-Z]{10} [0-9]{10} [\-\_\+\=\*\&\%\$\#\@\!\?\.\]{10}"                                                                                                                                                                                                ::
Password for 'https://...@github.org':
Traceback (most recent call last):
  File "/usr/local/Cellar/passpie/1.1.1/libexec/bin/passpie", line 9, in <module>
    load_entry_point('passpie==1.1.1', 'console_scripts', 'passpie')()
  File "/usr/local/Cellar/passpie/1.1.1/libexec/vendor/lib/python2.7/site-packages/click/core.py", line 716, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/Cellar/passpie/1.1.1/libexec/vendor/lib/python2.7/site-packages/click/core.py", line 696, in main
    rv = self.invoke(ctx)
  File "/usr/local/Cellar/passpie/1.1.1/libexec/vendor/lib/python2.7/site-packages/click/core.py", line 1060, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/Cellar/passpie/1.1.1/libexec/vendor/lib/python2.7/site-packages/click/core.py", line 889, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/Cellar/passpie/1.1.1/libexec/vendor/lib/python2.7/site-packages/click/core.py", line 534, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/Cellar/passpie/1.1.1/libexec/vendor/lib/python2.7/site-packages/click/decorators.py", line 64, in new_func
    return ctx.invoke(f, obj, *args[1:], **kwargs)
  File "/usr/local/Cellar/passpie/1.1.1/libexec/vendor/lib/python2.7/site-packages/click/core.py", line 534, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/Cellar/passpie/1.1.1/libexec/lib/python2.7/site-packages/passpie/cli.py", line 182, in add
    password = genpass(pattern=pattern)
  File "/usr/local/Cellar/passpie/1.1.1/libexec/lib/python2.7/site-packages/passpie/utils.py", line 17, in genpass
    return rstr.xeger(pattern)
  File "/usr/local/Cellar/passpie/1.1.1/libexec/vendor/lib/python2.7/site-packages/rstr/xeger.py", line 63, in xeger
    parsed = re.sre_parse.parse(pattern)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/sre_parse.py", line 716, in parse
    p = _parse_sub(source, pattern, 0)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/sre_parse.py", line 324, in _parse_sub
    itemsappend(_parse(source, state))
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/sre_parse.py", line 450, in _parse
    raise error, "unexpected end of regular expression"
sre_constants.error: unexpected end of regular expression
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant