@@ -434,7 +434,7 @@ func (s *Source) scanEvent(ctx context.Context, chunksChan chan *sources.Chunk,
434
434
metadata .LocationType = source_metadatapb .PostmanLocationType_COLLECTION_SCRIPT
435
435
}
436
436
437
- s .scanData (ctx , chunksChan , s .formatAndInjectKeywords (s .buildSubstituteSet (metadata , data )), metadata )
437
+ s .scanData (ctx , chunksChan , s .formatAndInjectKeywords (s .buildSubstituteSet (metadata , data , DefaultMaxRecursionDepth )), metadata )
438
438
metadata .LocationType = source_metadatapb .PostmanLocationType_UNKNOWN_POSTMAN
439
439
}
440
440
@@ -532,7 +532,7 @@ func (s *Source) scanAuth(ctx context.Context, chunksChan chan *sources.Chunk, m
532
532
} else if strings .Contains (m .Type , COLLECTION_TYPE ) {
533
533
m .LocationType = source_metadatapb .PostmanLocationType_COLLECTION_AUTHORIZATION
534
534
}
535
- s .scanData (ctx , chunksChan , s .formatAndInjectKeywords (s .buildSubstituteSet (m , authData )), m )
535
+ s .scanData (ctx , chunksChan , s .formatAndInjectKeywords (s .buildSubstituteSet (m , authData , DefaultMaxRecursionDepth )), m )
536
536
m .LocationType = source_metadatapb .PostmanLocationType_UNKNOWN_POSTMAN
537
537
}
538
538
@@ -555,7 +555,7 @@ func (s *Source) scanHTTPRequest(ctx context.Context, chunksChan chan *sources.C
555
555
metadata .Type = originalType + " > header"
556
556
metadata .Link = metadata .Link + "?tab=headers"
557
557
metadata .LocationType = source_metadatapb .PostmanLocationType_REQUEST_HEADER
558
- s .scanData (ctx , chunksChan , s .formatAndInjectKeywords (s .buildSubstituteSet (metadata , strings .Join (r .HeaderString , " " ))), metadata )
558
+ s .scanData (ctx , chunksChan , s .formatAndInjectKeywords (s .buildSubstituteSet (metadata , strings .Join (r .HeaderString , " " ), DefaultMaxRecursionDepth )), metadata )
559
559
metadata .LocationType = source_metadatapb .PostmanLocationType_UNKNOWN_POSTMAN
560
560
}
561
561
@@ -564,7 +564,7 @@ func (s *Source) scanHTTPRequest(ctx context.Context, chunksChan chan *sources.C
564
564
// Note: query parameters are handled separately
565
565
u := fmt .Sprintf ("%s://%s/%s" , r .URL .Protocol , strings .Join (r .URL .Host , "." ), strings .Join (r .URL .Path , "/" ))
566
566
metadata .LocationType = source_metadatapb .PostmanLocationType_REQUEST_URL
567
- s .scanData (ctx , chunksChan , s .formatAndInjectKeywords (s .buildSubstituteSet (metadata , u )), metadata )
567
+ s .scanData (ctx , chunksChan , s .formatAndInjectKeywords (s .buildSubstituteSet (metadata , u , DefaultMaxRecursionDepth )), metadata )
568
568
metadata .LocationType = source_metadatapb .PostmanLocationType_UNKNOWN_POSTMAN
569
569
}
570
570
@@ -615,13 +615,13 @@ func (s *Source) scanRequestBody(ctx context.Context, chunksChan chan *sources.C
615
615
m .Type = originalType + " > raw"
616
616
data := b .Raw
617
617
m .LocationType = source_metadatapb .PostmanLocationType_REQUEST_BODY_RAW
618
- s .scanData (ctx , chunksChan , s .formatAndInjectKeywords (s .buildSubstituteSet (m , data )), m )
618
+ s .scanData (ctx , chunksChan , s .formatAndInjectKeywords (s .buildSubstituteSet (m , data , DefaultMaxRecursionDepth )), m )
619
619
m .LocationType = source_metadatapb .PostmanLocationType_UNKNOWN_POSTMAN
620
620
case "graphql" :
621
621
m .Type = originalType + " > graphql"
622
622
data := b .GraphQL .Query + " " + b .GraphQL .Variables
623
623
m .LocationType = source_metadatapb .PostmanLocationType_REQUEST_BODY_GRAPHQL
624
- s .scanData (ctx , chunksChan , s .formatAndInjectKeywords (s .buildSubstituteSet (m , data )), m )
624
+ s .scanData (ctx , chunksChan , s .formatAndInjectKeywords (s .buildSubstituteSet (m , data , DefaultMaxRecursionDepth )), m )
625
625
m .LocationType = source_metadatapb .PostmanLocationType_UNKNOWN_POSTMAN
626
626
}
627
627
}
@@ -647,15 +647,15 @@ func (s *Source) scanHTTPResponse(ctx context.Context, chunksChan chan *sources.
647
647
m .Type = originalType + " > response header"
648
648
// TODO Note: for now, links to Postman responses do not include a more granular tab for the params/header/body, but when they do, we will need to update the metadata.Link info
649
649
m .LocationType = source_metadatapb .PostmanLocationType_RESPONSE_HEADER
650
- s .scanData (ctx , chunksChan , s .formatAndInjectKeywords (s .buildSubstituteSet (m , strings .Join (response .HeaderString , " " ))), m )
650
+ s .scanData (ctx , chunksChan , s .formatAndInjectKeywords (s .buildSubstituteSet (m , strings .Join (response .HeaderString , " " ), DefaultMaxRecursionDepth )), m )
651
651
m .LocationType = source_metadatapb .PostmanLocationType_UNKNOWN_POSTMAN
652
652
}
653
653
654
654
// Body in a response is just a string
655
655
if response .Body != "" {
656
656
m .Type = originalType + " > response body"
657
657
m .LocationType = source_metadatapb .PostmanLocationType_RESPONSE_BODY
658
- s .scanData (ctx , chunksChan , s .formatAndInjectKeywords (s .buildSubstituteSet (m , response .Body )), m )
658
+ s .scanData (ctx , chunksChan , s .formatAndInjectKeywords (s .buildSubstituteSet (m , response .Body , DefaultMaxRecursionDepth )), m )
659
659
m .LocationType = source_metadatapb .PostmanLocationType_UNKNOWN_POSTMAN
660
660
}
661
661
@@ -688,7 +688,7 @@ func (s *Source) scanVariableData(ctx context.Context, chunksChan chan *sources.
688
688
if valStr == "" {
689
689
continue
690
690
}
691
- values = append (values , s .buildSubstituteSet (m , valStr )... )
691
+ values = append (values , s .buildSubstituteSet (m , valStr , DefaultMaxRecursionDepth )... )
692
692
}
693
693
694
694
m .FieldType = m .Type + " variables"
0 commit comments