Graylog2 / Graylog2/graylog2-server

Adding stream rule with 0 ID using API breaks server

Open
#6,382 2 comments 0 reactions 1 assignee Claimed by @dennisoelkers View on GitHub
bug triaged
Dominant language
Java
Stars
8.1k
Forks
1.1k
Avg merge
1d 20h
Merged PRs (30d)
217

Description

Mongodb database cannot start properly after the API call which contains wrong type id.

## Expected Behavior

mongodb starts without errors

## Current Behavior

I receive the error
```
Unable to create injector, see the following errors: graylog
```

## Possible Solution

Adding api checks

## Steps to Reproduce (for bugs)

1. open Swagger
2. go to StreamRules
3. create a rule with content like
```json
{
"type": "0",
"value": "value1",
"field": "field1",
"inverted": "false",
"description": "super description"
}
```
4. restart database

## Context

of course after changing the wrong id in the database to correct value it starts working correctly.

## Your Environment

* Graylog Version: 3.1
* Elasticsearch Version: 6.8
* MongoDB Version: 3
* Operating System: Centos 7
* Browser version: Firefox 69.0

_sorry for my b English._

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.