Skip to content

Bugfix/ai html updates - #3962

Merged
kobenguyent merged 3 commits into
3.xfrom
bugfix/ai-html-updates
Dec 4, 2023
Merged

Bugfix/ai html updates#3962
kobenguyent merged 3 commits into
3.xfrom
bugfix/ai-html-updates

Conversation

@DavertMik

Copy link
Copy Markdown
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
Copy Markdown
Contributor Author

Released as beta

codeceptjs@3.5.7-beta.1

Comment thread package.json
"fs-extra": "8.1.0",
"glob": "6.0.1",
"html-minifier": "4.0.0",
"html-minifier-terser": "^7.2.0",

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

shall we remove ^?

Comment thread lib/ai.js

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

Copy link
Copy Markdown
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
@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