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

File path not escaped properly when adding a "Quick Values" filter #4111

Closed
mbrenig opened this issue Aug 25, 2017 · 0 comments
Closed

File path not escaped properly when adding a "Quick Values" filter #4111

mbrenig opened this issue Aug 25, 2017 · 0 comments
Assignees
Labels
Milestone

Comments

@mbrenig
Copy link

@mbrenig mbrenig commented Aug 25, 2017

When viewing messages with a file field value (with an absolute, windows style path, such as C:\Program Files\Atlassian\Application Data\JIRA\log\atlassian-jira.log) adding a search filter by clicking the spyglass icon in the "Quick Values" visualization fails. This is because the path is not escaped properly. Very similar to issue #3287

graylogescapebug

Expected Behavior

The file filter term added to the search is correctly escaped like so:
graylogescapebugii

Current Behavior

No search results due to incorrect filter condition.
file:"C:\Program Files\Atlassian\Application Data\JIRA\log\atlassian-jira.log"

Possible Solution

Workaround by manually escaping the file path.

Steps to Reproduce (for bugs)

  1. Have a search result with messages that contain a file field with absolute windows path value
  2. Per first screenshot above, open the file field and click "Quick values"
  3. Click the spyglass in the quick values visualization to add the offending (unescaped) search term

Context

This bug means I can't quickly filter my search results. See #3287 for a related problem. Perhaps there are other user actions that can lead to an un-escaped search term being added to the search?

Your Environment

We're using: http://docs.graylog.org/en/latest/pages/installation/virtual_machine_appliances.html

But...

  • Graylog Version: Graylog 2.2.2+691b4b7
  • Elasticsearch Version: 2.4.2
  • MongoDB Version: v3.4.1
  • Operating System: Linux 4.2.0-42-generic (Ubuntu 14.04.5 LTS)
  • Browser version: Version 60.0.3112.101 (Official Build) (64-bit)
@kmerz kmerz self-assigned this Jan 15, 2018
@kmerz kmerz added this to the 3.0.0 milestone Jan 15, 2018
kmerz added a commit that referenced this issue Jan 15, 2018
The add search term button (eg. in the Quick Values view)
is adding search terms to the search bar. A search term
with spaces will be treated as a phrase and therefor will
only surrounded by double quotes. But those phrases did
not escape backslashes which is still needed to perform
the search.

Now phrases will also get the backslashes escaped.

Also: Add some tests for adding a search term.

Fixes #4111
@kmerz kmerz mentioned this issue Jan 15, 2018
1 of 3 tasks complete
@ghost ghost added the in progress label Jan 15, 2018
kmerz added a commit that referenced this issue Jan 15, 2018
The add search term button (eg. in the Quick Values view)
is adding search terms to the search bar. A search term
with spaces will be treated as a phrase and therefor will
only surrounded by double quotes. But those phrases did
not escape backslashes which is still needed to perform
the search.

Now phrases will also get the backslashes escaped.

Also: Add some tests for adding a search term.

Fixes #4111
edmundoa added a commit that referenced this issue Jan 22, 2018
The add search term button (eg. in the Quick Values view)
is adding search terms to the search bar. A search term
with spaces will be treated as a phrase and therefor will
only surrounded by double quotes. But those phrases did
not escape backslashes which is still needed to perform
the search.

Now phrases will also get the backslashes escaped.

Also: Add some tests for adding a search term.

Fixes #4111
@ghost ghost removed the in progress label Jan 22, 2018
bernd added a commit that referenced this issue Nov 26, 2018
The add search term button (eg. in the Quick Values view)
is adding search terms to the search bar. A search term
with spaces will be treated as a phrase and therefor will
only surrounded by double quotes. But those phrases did
not escape backslashes which is still needed to perform
the search.

Now phrases will also get the backslashes escaped.

Also: Add some tests for adding a search term.

Fixes #4111

(cherry picked from commit bfc4a9f)
bernd added a commit that referenced this issue Nov 26, 2018
The add search term button (eg. in the Quick Values view)
is adding search terms to the search bar. A search term
with spaces will be treated as a phrase and therefor will
only surrounded by double quotes. But those phrases did
not escape backslashes which is still needed to perform
the search.

Now phrases will also get the backslashes escaped.

Also: Add some tests for adding a search term.

Fixes #4111
Fixes #5266

(cherry picked from commit bfc4a9f)
edmundoa added a commit that referenced this issue Nov 26, 2018
The add search term button (eg. in the Quick Values view)
is adding search terms to the search bar. A search term
with spaces will be treated as a phrase and therefor will
only surrounded by double quotes. But those phrases did
not escape backslashes which is still needed to perform
the search.

Now phrases will also get the backslashes escaped.

Also: Add some tests for adding a search term.

Fixes #4111
Fixes #5266

(cherry picked from commit bfc4a9f)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

3 participants
You can’t perform that action at this time.