Skip to content

Commit 324ed02

Browse files
committed
Fix
1 parent 0041c3f commit 324ed02

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

library/agent/api-discovery/getStringFormat.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ const indicationChars = new Set<string>(["-", ":", "@", ".", "://"]);
2525
* https://swagger.io/docs/specification/v3_0/data-models/data-types/#strings
2626
*/
2727
export function getStringFormat(str: string): StringFormat | undefined {
28-
// Skip if too short or very long
29-
if (str.length < 5 || str.length > 1_000) {
28+
// Skip if too short
29+
if (str.length < 5) {
3030
return undefined;
3131
}
3232

library/vulnerabilities/attack-wave-detection/checkQuery.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export function checkQuery(context: Context): boolean {
3030
}
3131
for (const str of queryStrings) {
3232
// Performance optimization
33-
if (str.length < 5) {
33+
if (str.length < 5 || str.length > 1_000) {
3434
continue;
3535
}
3636

0 commit comments

Comments
 (0)