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

Revert pipeline processor invalid field access check due to regression #18322

Merged
merged 3 commits into from
Mar 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions changelog/unreleased/issue-18017.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
type = "f"
message = "Reverts fix for #16029 due to regression in GeoIP lookup table access."

issues = ["18017"]
pulls = ["18322"]
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import com.google.common.collect.Maps;
import com.google.common.collect.Sets;
import com.swrve.ratelimitedlogger.RateLimitedLog;
import jakarta.inject.Inject;
import org.antlr.v4.runtime.ANTLRInputStream;
import org.antlr.v4.runtime.BaseErrorListener;
import org.antlr.v4.runtime.CommonTokenStream;
Expand Down Expand Up @@ -73,7 +74,6 @@
import org.graylog.plugins.pipelineprocessor.parser.errors.IncompatibleIndexType;
import org.graylog.plugins.pipelineprocessor.parser.errors.IncompatibleType;
import org.graylog.plugins.pipelineprocessor.parser.errors.IncompatibleTypes;
import org.graylog.plugins.pipelineprocessor.parser.errors.InvalidFieldAccess;
import org.graylog.plugins.pipelineprocessor.parser.errors.InvalidFunctionArgument;
import org.graylog.plugins.pipelineprocessor.parser.errors.InvalidOperation;
import org.graylog.plugins.pipelineprocessor.parser.errors.MissingRequiredParam;
Expand All @@ -89,8 +89,6 @@
import org.joda.time.Duration;
import org.joda.time.Period;

import jakarta.inject.Inject;

import java.util.ArrayDeque;
import java.util.HashMap;
import java.util.IdentityHashMap;
Expand Down Expand Up @@ -436,9 +434,6 @@ public void exitNested(RuleLangParser.NestedContext ctx) {
isIdIsFieldAccess.pop(); // reset for error checks
final Expression object = exprs.get(ctx.fieldSet);
final Expression field = exprs.get(ctx.field);
if (field instanceof ArrayLiteralExpression) {
parseContext.addError(new InvalidFieldAccess(ctx, field));
}
final FieldAccessExpression expr = new FieldAccessExpression(ctx.getStart(), object, field);
log.trace("FIELDACCESS: ctx {} => {}", ctx, expr);
exprs.put(ctx, expr);
Expand Down

This file was deleted.

Loading