fix: events.include and events.ignore now filter for both events.stream and api.rest

This commit is contained in:
evilsocket 2019-03-21 11:20:48 +01:00
parent f23c780eee
commit 2e3e4f453b
No known key found for this signature in database
GPG key ID: 1564D7F30393A456
5 changed files with 54 additions and 42 deletions

View file

@ -176,7 +176,13 @@ func (mod *RestAPI) showEvents(w http.ResponseWriter, r *http.Request) {
if mod.useWebsocket {
mod.startStreamingEvents(w, r)
} else {
events := session.I.Events.Sorted()
events := make([]session.Event, 0)
for _, e := range session.I.Events.Sorted() {
if mod.Session.EventsIgnoreList.Ignored(e) == false {
events = append(events, e)
}
}
nevents := len(events)
nmax := nevents
n := nmax