Skip to content

Commit

Permalink
fix(scan): correct param handling to respect user provided values (#566)
Browse files Browse the repository at this point in the history
the `applyDefaultSettings` was doing null check a little wrong and as a
result the default param were always applied.
  • Loading branch information
maksadbek committed Jul 19, 2024
1 parent b2f604b commit a62549d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Scan/RestScans.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,9 @@ export class RestScans implements Scans {
scanConfig: Omit<ScanConfig, 'headers'>
): Promise<Omit<ScanConfig, 'headers'>> {
const attackParamLocations =
scanConfig.attackParamLocations ?? scanConfig.templateId
? undefined
: [...ATTACK_PARAM_LOCATIONS_DEFAULT];
scanConfig.attackParamLocations ??
(scanConfig.templateId ? undefined : [...ATTACK_PARAM_LOCATIONS_DEFAULT]);

const exclusions =
scanConfig.exclusions?.params || scanConfig.exclusions?.requests
? scanConfig.exclusions
Expand Down

0 comments on commit a62549d

Please sign in to comment.