metron-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Justin Leet (JIRA)" <j...@apache.org>
Subject [jira] [Created] (METRON-1921) Stellar shell strings with dollar signs handled incorrectly
Date Wed, 05 Dec 2018 21:32:00 GMT
Justin Leet created METRON-1921:
-----------------------------------

             Summary: Stellar shell strings with dollar signs handled incorrectly
                 Key: METRON-1921
                 URL: https://issues.apache.org/jira/browse/METRON-1921
             Project: Metron
          Issue Type: Bug
            Reporter: Justin Leet
            Assignee: Justin Leet


'$' causes issues within strings. Specifically, if a string ends in '$', the string will be
"". If the '$' is in the middle of the string, it will only return the portion before the
'$'.
{code:java}
[Stellar]>>> 'foo$bar'
foo
[Stellar]>>> 'foo$'
{code}
This can be worked around by doing something like "var := SHELL_EDIT()" and entering "foo$bar"
there.

This can cause issues with things like profiles, where $ may be be present in the entity name.

The unit tests can't hit this as of right now, because the unit tests directly pass a buffer
with the shell string. However, this bypasses processing from Console (which does some handling
of various things).

This can be solved by turning off export for Aesh, which is the easy way to do it, and worked
in manual testing. From the Aesh documentation
{quote}Variables
 Æsh provide variable support similar to POSIX shells. The variables can be managed during
runtime with the export command and/or from a file during startup.
{quote}
This appears to be handled by '$', but it also causes problems when you try to escape it.
It might be possible to fix this problem to allow users to use these variables instead of
just disabling it.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message