@@ -2316,6 +2316,9 @@ func (s *Server) jsLeaderServerRemoveRequest(sub *subscription, c *client, _ *Ac
2316
2316
s .Warnf (badAPIRequestT , msg )
2317
2317
return
2318
2318
}
2319
+ if acc != s .SystemAccount () {
2320
+ return
2321
+ }
2319
2322
2320
2323
js , cc := s .getJetStreamCluster ()
2321
2324
if js == nil || cc == nil || cc .meta == nil {
@@ -2440,6 +2443,10 @@ func (s *Server) jsLeaderServerStreamMoveRequest(sub *subscription, c *client, _
2440
2443
accName := tokenAt (subject , 6 )
2441
2444
streamName := tokenAt (subject , 7 )
2442
2445
2446
+ if acc .GetName () != accName && acc != s .SystemAccount () {
2447
+ return
2448
+ }
2449
+
2443
2450
var resp = JSApiStreamUpdateResponse {ApiResponse : ApiResponse {Type : JSApiStreamUpdateResponseType }}
2444
2451
2445
2452
var req JSApiMetaServerStreamMoveRequest
@@ -2596,6 +2603,10 @@ func (s *Server) jsLeaderServerStreamCancelMoveRequest(sub *subscription, c *cli
2596
2603
accName := tokenAt (subject , 6 )
2597
2604
streamName := tokenAt (subject , 7 )
2598
2605
2606
+ if acc .GetName () != accName && acc != s .SystemAccount () {
2607
+ return
2608
+ }
2609
+
2599
2610
targetAcc , ok := s .accounts .Load (accName )
2600
2611
if ! ok {
2601
2612
resp .Error = NewJSNoAccountError ()
@@ -2682,6 +2693,9 @@ func (s *Server) jsLeaderAccountPurgeRequest(sub *subscription, c *client, _ *Ac
2682
2693
s .Warnf (badAPIRequestT , msg )
2683
2694
return
2684
2695
}
2696
+ if acc != s .SystemAccount () {
2697
+ return
2698
+ }
2685
2699
2686
2700
js := s .getJetStream ()
2687
2701
if js == nil {
0 commit comments