mirror of
https://github.com/wassname/talk.git
synced 2026-08-13 12:40:11 +08:00
[CORL-1126] Run regex in a sandbox so it can time out (#2988)
* Run regex in a sandbox so it can time out If it times out, we flag it and system withhold it for future analysis. CORL-1126 * Pass regex and test string into wordList sandbox Allows us to use the pre-cached regex instead of regenerating it via an in-line script copy. CORL-1126 * feat: improve script reuse * fix: renamed some functions * fix: improve script performance * feat: added testString to log output if it times out * fix: fixed issue with form alert not showing * fix: use a timeout from config Co-authored-by: Wyatt Johnson <me@wyattjoh.ca> Co-authored-by: Wyatt Johnson <wyattjoh@gmail.com>
This commit is contained in:
co-authored by
Wyatt Johnson
Wyatt Johnson
parent
ebe7731222
commit
feaf4858df
+8
-1
@@ -163,7 +163,14 @@ export class PostCommentFormContainer extends Component<Props, State> {
|
||||
state,
|
||||
form
|
||||
) => {
|
||||
if (this.state.submitStatus && state.dirty) {
|
||||
if (
|
||||
this.state.submitStatus &&
|
||||
state.dirty &&
|
||||
// This is required because the body is somehow being "dirtied" once the
|
||||
// form has been reinitialized.
|
||||
// FIXME: (wyattjoh) discover why when a comment is submitted, it eventually sets this as the body afterwards
|
||||
state.values.body !== "<div><br></div>"
|
||||
) {
|
||||
this.setState({ submitStatus: null });
|
||||
}
|
||||
if (state.values.body) {
|
||||
|
||||
Reference in New Issue
Block a user