mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-02 03:38:42 -07:00
Fix not validating single token filtered consumer
Signed-off-by: Tomasz Pietrek <tomasz@nats.io>
This commit is contained in:
@@ -3744,11 +3744,12 @@ func (s *Server) jsConsumerCreateRequest(sub *subscription, c *client, a *Accoun
|
||||
} else {
|
||||
streamName = streamNameFromSubject(subject)
|
||||
consumerName = consumerNameFromSubject(subject)
|
||||
}
|
||||
// New has optional filtered subject as part of main subject..
|
||||
if n > 7 {
|
||||
tokens := strings.Split(subject, tsep)
|
||||
filteredSubject = strings.Join(tokens[6:], tsep)
|
||||
// New has optional filtered subject as part of main subject..
|
||||
if n > 6 {
|
||||
|
||||
tokens := strings.Split(subject, tsep)
|
||||
filteredSubject = strings.Join(tokens[6:], tsep)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user