reject signatures using relative and non-relative positional keywords for the same content (depth or offset with distance or within)
}
}
+ if (cd->flags & DETECT_CONTENT_WITHIN || cd->flags & DETECT_CONTENT_DISTANCE) {
+ SCLogError(SC_ERR_INVALID_SIGNATURE, "You can't use a relative keyword "
+ "with a non-relative keyword for the same content." );
+ goto error;
+ }
+
if (str[0] != '-' && isalpha(str[0])) {
SigMatch *bed_sm =
DetectByteExtractRetrieveSMVar(str, s,
}
}
+ if (cd->flags & DETECT_CONTENT_DEPTH || cd->flags & DETECT_CONTENT_OFFSET) {
+ SCLogError(SC_ERR_INVALID_SIGNATURE, "You can't use a relative keyword "
+ "with a non-relative keyword for the same content." );
+ goto error;
+ }
+
if (str[0] != '-' && isalpha(str[0])) {
SigMatch *bed_sm =
DetectByteExtractRetrieveSMVar(str, s,
}
}
+ if (cd->flags & DETECT_CONTENT_WITHIN || cd->flags & DETECT_CONTENT_DISTANCE) {
+ SCLogError(SC_ERR_INVALID_SIGNATURE, "You can't use a relative keyword "
+ "with a non-relative keyword for the same content." );
+ goto error;
+ }
+
if (str[0] != '-' && isalpha(str[0])) {
SigMatch *bed_sm =
DetectByteExtractRetrieveSMVar(str, s,
break;
-
default:
SCLogError(SC_ERR_OFFSET_MISSING_CONTENT, "offset needs a preceeding"
" content or uricontent option");
}
}
+ if (cd->flags & DETECT_CONTENT_DEPTH || cd->flags & DETECT_CONTENT_OFFSET) {
+ SCLogError(SC_ERR_INVALID_SIGNATURE, "You can't use a relative keyword "
+ "with a non-relative keyword for the same content." );
+ goto error;
+ }
+
if (str[0] != '-' && isalpha(str[0])) {
SigMatch *bed_sm =
DetectByteExtractRetrieveSMVar(str, s,