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

Entering """ or '''' crashes the sandbox #86

Open
DavidMarchant opened this issue Oct 10, 2018 · 3 comments
Open

Entering """ or '''' crashes the sandbox #86

DavidMarchant opened this issue Oct 10, 2018 · 3 comments
Labels
bug Something isn't working

Comments

@DavidMarchant
Copy link
Contributor

No description provided.

@WilliamMcCumstie
Copy link
Contributor

WilliamMcCumstie commented Oct 10, 2018

This doesn't sound good. Could we get some more information about the issue? It sounds a bit more important than low priority.

@WilliamMcCumstie WilliamMcCumstie added bug Something isn't working and removed low priority labels Oct 10, 2018
@DavidMarchant
Copy link
Contributor Author

DavidMarchant commented Oct 10, 2018

Yes, absolutely:

adminware> '''
Traceback (most recent call last):
  File "src/adminware", line 7, in <module>
    adminware()
  File "/tmp/adminware/venv/lib/python3.5/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/tmp/adminware/venv/lib/python3.5/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/tmp/adminware/venv/lib/python3.5/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/tmp/adminware/venv/lib/python3.5/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/tmp/adminware/venv/lib/python3.5/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/tmp/adminware/src/appliance_cli/sandbox.py", line 27, in sandbox
    allow_internal_commands=False,
  File "/tmp/adminware/venv/src/click-repl/click_repl/__init__.py", line 190, in repl
    args = shlex.split(command)
  File "/usr/lib64/python3.5/shlex.py", line 273, in split
    return list(lex)
  File "/usr/lib64/python3.5/shlex.py", line 263, in __next__
    token = self.get_token()
  File "/usr/lib64/python3.5/shlex.py", line 90, in get_token
    raw = self.read_token()
  File "/usr/lib64/python3.5/shlex.py", line 166, in read_token
    raise ValueError("No closing quotation")
ValueError: No closing quotation

The reason I specified low priority is it's been a known issue with userware (openflighthpc/flight-directory#22) for quite some time.
What do you want to do about it?

@WilliamMcCumstie
Copy link
Contributor

Hmmm this looks like a click issue and quite possible is out of our control. The bug is occurring within library code before we get to the commands. Therefore we won't have an opportunity to parse the input before it errors.

The best we could possible do is catch the exception inside the adminware command. Then possible check argv if it is running in sandbox mode, and restart the appliance.

  File "src/adminware", line 7, in <module>
    adminware()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants