We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6d2fc8c commit c81868bCopy full SHA for c81868b
1 file changed
src/bridge/effect_adapter.rs
@@ -1227,8 +1227,11 @@ fn parse_cadence(
1227
.to_string());
1228
}
1229
};
1230
- // Validate the pattern compiles as a regex.
1231
- if let Err(e) = regex::Regex::new(pattern) {
+ // Validate with the same size limit the engine uses at runtime.
+ if let Err(e) = regex::RegexBuilder::new(pattern)
1232
+ .size_limit(64 * 1024)
1233
+ .build()
1234
+ {
1235
return Err(format!(
1236
"event pattern '{pattern}' is not a valid regex: {e}"
1237
));
0 commit comments