Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix/ai html updates #3962

Merged
merged 3 commits into from
Dec 4, 2023
Merged

Bugfix/ai html updates #3962

merged 3 commits into from
Dec 4, 2023

Conversation

DavertMik
Copy link
Contributor

  • replaced minify library with a modern and more secure fork. Fixes html-minifier@4.0.0 Regular Expression Denial of Service vulnerability #3829
  • AI class is implemented as singleton
  • refactored heal.js plugin to work on edge cases
  • add configuration params on number of fixes performed by ay heal
  • improved recorder class to add more verbose log
  • improved recorder class to ignore some of errors

@DavertMik
Copy link
Contributor Author

Released as beta

codeceptjs@3.5.7-beta.1

@@ -86,7 +86,7 @@
"fn-args": "4.0.0",
"fs-extra": "8.1.0",
"glob": "6.0.1",
"html-minifier": "4.0.0",
"html-minifier-terser": "^7.2.0",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shall we remove ^?

@@ -35,13 +40,17 @@ class AiAssistant {
this.openai = new OpenAIApi(configuration);
}

setHtmlContext(html) {
static getInstance() {
return aiInstance || new AiAssistant();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

out of curiosity, I saw const aiInstance = null; at line 19 and it is not assigned, does this code here alway return the new AiAssistant();

@kobenguyent kobenguyent merged commit aa52de8 into 3.x Dec 4, 2023
12 checks passed
@kobenguyent kobenguyent deleted the bugfix/ai-html-updates branch December 4, 2023 09:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

html-minifier@4.0.0 Regular Expression Denial of Service vulnerability
3 participants