elastic / elastic/logstash

Strings should not be valid rvalues in regexp statements

Open
#6,697 0 comments 0 reactions 0 assignees View on GitHub
bug v6.0.0
Dominant language
Java
Stars
14.9k
Forks
3.5k
Avg merge
1d 4h
Merged PRs (30d)
88

Description

Currently `if [foo] =~ "bar"` is valid logstash configuration syntax. This is insane. We should be more strict and only support regexps as rvalues in this case.

Not sure if this is technically a 'bug' at this point, but it's very confusing!

Contributor guide

Open the contributing guide

Research direction

No file, test, or entry point is named. Start by locating the Logstash configuration parsing and validation for regexp statements, then identify how rvalues are checked; done means a quoted string is rejected in this context while a regexp remains valid, with tests covering both cases.

Written by the indexing model from the issue text.

Assessment

Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.