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
Shell: Incorrect parse of command line #500
Comments
gallardo
added a commit
to gallardo/opencms-core
that referenced
this issue
Jun 1, 2017
Ignore `null` tokens. Fixes alkacon#500
gallardo
added a commit
to gallardo/opencms-core
that referenced
this issue
Jun 7, 2017
Ignore `null` tokens. Fixes alkacon#500 Includes i18n for `en`,`de` and `es`. Includes unit test.
tHerrmann
pushed a commit
that referenced
this issue
Feb 22, 2018
Ignore `null` tokens. Fixes #500 Includes i18n for `en`,`de` and `es`. Includes unit test. Conflicts: src/org/opencms/main/CmsShell.java
gallardo
added a commit
to gallardo/opencms-core
that referenced
this issue
Dec 21, 2023
Ignore `null` tokens. Fixes alkacon#500 Includes i18n for `en`,`de` and `es`. Includes unit test.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The
StreamTokenizer
generatesnull
tokens for some chars (e.g.[
,]
,(
,{
...).During an interactive shell, if the user unintentionally types one of these characters, the shell will incorrectly interpret it as a
null
command or parameter, resulting in a NPE that terminates the shell ( (or should terminate it, see #499).An aggravating factor is that the command line doesn't handle escape sequences, and these are consequently passed to the shell. (In linux up generates
^[[A
, whose byte representation is{27, 91, 65}
, or{KeyEvent.VK_ESCAPE, KeyEvent.VK_OPEN_BRACKET, 'A'}
.)The text was updated successfully, but these errors were encountered: