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

Can't encrypt three dashes #17

Open
kierenevans opened this issue Apr 8, 2019 · 1 comment
Open

Can't encrypt three dashes #17

kierenevans opened this issue Apr 8, 2019 · 1 comment

Comments

@kierenevans
Copy link
Collaborator

kierenevans commented Apr 8, 2019

Example from when I was trying to encrypt an SSL certificate:

ws secret encrypt "$(cat certificate.crt)"
PHP Fatal error:  Uncaught Error: __clone method called on non-object in phar:///usr/local/bin/ws/vendor/my127/my127/src/Console/src/Application/Event/InvalidUsageEvent.php:21
Stack trace:
#0 phar:///usr/local/bin/ws/vendor/my127/my127/src/Console/src/Application/Plugin/ContextualHelpPlugin.php(34): my127\Console\Application\Event\InvalidUsageEvent->getInputSequence()
#1 phar:///usr/local/bin/ws/vendor/symfony/event-dispatcher/EventDispatcher.php(212): my127\Console\Application\Plugin\ContextualHelpPlugin->my127\Console\Application\Plugin\{closure}(Object(my127\Console\Application\Event\InvalidUsageEvent), 'my127.console.a...', Object(Symfony\Component\EventDispatcher\EventDispatcher))
#2 phar:///usr/local/bin/ws/vendor/symfony/event-dispatcher/EventDispatcher.php(44): Symfony\Component\EventDispatcher\EventDispatcher->doDispatch(Array, 'my127.console.a...', Object(my127\Console\Application\Event\InvalidUsageEvent))
#3 phar:///usr/local/bin/ws/vendor/my127/my127/src/Console/src/Application/Executor.php(150): Symfony\Component\ in phar:///usr/local/bin/ws/vendor/my127/my127/src/Console/src/Application/Event/InvalidUsageEvent.php on line 21

Fatal error: Uncaught Error: __clone method called on non-object in phar:///usr/local/bin/ws/vendor/my127/my127/src/Console/src/Application/Event/InvalidUsageEvent.php:21
Stack trace:
#0 phar:///usr/local/bin/ws/vendor/my127/my127/src/Console/src/Application/Plugin/ContextualHelpPlugin.php(34): my127\Console\Application\Event\InvalidUsageEvent->getInputSequence()
#1 phar:///usr/local/bin/ws/vendor/symfony/event-dispatcher/EventDispatcher.php(212): my127\Console\Application\Plugin\ContextualHelpPlugin->my127\Console\Application\Plugin\{closure}(Object(my127\Console\Application\Event\InvalidUsageEvent), 'my127.console.a...', Object(Symfony\Component\EventDispatcher\EventDispatcher))
#2 phar:///usr/local/bin/ws/vendor/symfony/event-dispatcher/EventDispatcher.php(44): Symfony\Component\EventDispatcher\EventDispatcher->doDispatch(Array, 'my127.console.a...', Object(my127\Console\Application\Event\InvalidUsageEvent))
#3 phar:///usr/local/bin/ws/vendor/my127/my127/src/Console/src/Application/Executor.php(150): Symfony\Component\ in phar:///usr/local/bin/ws/vendor/my127/my127/src/Console/src/Application/Event/InvalidUsageEvent.php on line 21

I've isolated it down to this which is from the header of an SSH key:

ws secret encrypt "-" # Fine
ws secret encrypt "--" # Fine
ws secret encrypt "---"
PHP Fatal error:  Uncaught Error: __clone method called on non-object in phar:///usr/local/bin/ws/vendor/my127/my127/src/Console/src/Application/Event/InvalidUsageEvent.php:21
Stack trace:
#0 phar:///usr/local/bin/ws/vendor/my127/my127/src/Console/src/Application/Plugin/ContextualHelpPlugin.php(34): my127\Console\Application\Event\InvalidUsageEvent->getInputSequence()
#1 phar:///usr/local/bin/ws/vendor/symfony/event-dispatcher/EventDispatcher.php(212): my127\Console\Application\Plugin\ContextualHelpPlugin->my127\Console\Application\Plugin\{closure}(Object(my127\Console\Application\Event\InvalidUsageEvent), 'my127.console.a...', Object(Symfony\Component\EventDispatcher\EventDispatcher))
#2 phar:///usr/local/bin/ws/vendor/symfony/event-dispatcher/EventDispatcher.php(44): Symfony\Component\EventDispatcher\EventDispatcher->doDispatch(Array, 'my127.console.a...', Object(my127\Console\Application\Event\InvalidUsageEvent))
#3 phar:///usr/local/bin/ws/vendor/my127/my127/src/Console/src/Application/Executor.php(150): Symfony\Component\ in phar:///usr/local/bin/ws/vendor/my127/my127/src/Console/src/Application/Event/InvalidUsageEvent.php on line 21

Fatal error: Uncaught Error: __clone method called on non-object in phar:///usr/local/bin/ws/vendor/my127/my127/src/Console/src/Application/Event/InvalidUsageEvent.php:21
Stack trace:
#0 phar:///usr/local/bin/ws/vendor/my127/my127/src/Console/src/Application/Plugin/ContextualHelpPlugin.php(34): my127\Console\Application\Event\InvalidUsageEvent->getInputSequence()
#1 phar:///usr/local/bin/ws/vendor/symfony/event-dispatcher/EventDispatcher.php(212): my127\Console\Application\Plugin\ContextualHelpPlugin->my127\Console\Application\Plugin\{closure}(Object(my127\Console\Application\Event\InvalidUsageEvent), 'my127.console.a...', Object(Symfony\Component\EventDispatcher\EventDispatcher))
#2 phar:///usr/local/bin/ws/vendor/symfony/event-dispatcher/EventDispatcher.php(44): Symfony\Component\EventDispatcher\EventDispatcher->doDispatch(Array, 'my127.console.a...', Object(my127\Console\Application\Event\InvalidUsageEvent))
#3 phar:///usr/local/bin/ws/vendor/my127/my127/src/Console/src/Application/Executor.php(150): Symfony\Component\ in phar:///usr/local/bin/ws/vendor/my127/my127/src/Console/src/Application/Event/InvalidUsageEvent.php on line 21
@kierenevans kierenevans changed the title Can't encrypt multiple lines Can't encrypt three dashes Apr 11, 2019
@andytson-inviqa
Copy link
Contributor

andytson-inviqa commented Oct 24, 2019

@kierenevans does it work with:

ws secret encrypt -- ----

- and -- are for command options, whether quoted or not it has no bearing, which may not even be processed as encrypted data. -- on it's own is usually used to indicate that any - arguments after are arguments rather than options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants