Skip to content

Implements pdf from scratch#706

Merged
kevin-atnos merged 7 commits intomasterfrom
prepare-new-pdf
Feb 21, 2023
Merged

Implements pdf from scratch#706
kevin-atnos merged 7 commits intomasterfrom
prepare-new-pdf

Conversation

@kevin-atnos
Copy link
Copy Markdown
Collaborator

No description provided.

string = string.replace(htmlRegex2, '');
const htmlRegex3 = /<span class='strong'>/g;
string = string.replace(htmlRegex3, '');
const htmlRegexFinal = /<(?:"[^"]*"['"]*|'[^']*'['"]*|[^'">])+>/g;

Check failure

Code scanning / CodeQL

Inefficient regular expression

This part of the regular expression may cause exponential backtracking on strings starting with '<""' and containing many repetitions of '""'.
string = string.replace(htmlRegex2, '');
const htmlRegex3 = /<span class='strong'>/g;
string = string.replace(htmlRegex3, '');
const htmlRegexFinal = /<(?:"[^"]*"['"]*|'[^']*'['"]*|[^'">])+>/g;

Check failure

Code scanning / CodeQL

Inefficient regular expression

This part of the regular expression may cause exponential backtracking on strings starting with '<''' and containing many repetitions of ''''.
const htmlRegex3 = /<span class='strong'>/g;
string = string.replace(htmlRegex3, '');
const htmlRegexFinal = /<(?:"[^"]*"['"]*|'[^']*'['"]*|[^'">])+>/g;
string = string.replace(htmlRegexFinal, '');

Check failure

Code scanning / CodeQL

Incomplete multi-character sanitization

This string may still contain [<script](1), which may cause an HTML element injection vulnerability.
@kevin-atnos kevin-atnos requested a review from brunto February 20, 2023 13:29
brunto
brunto previously approved these changes Feb 20, 2023
@kevin-atnos kevin-atnos merged commit 901947a into master Feb 21, 2023
@kevin-atnos kevin-atnos deleted the prepare-new-pdf branch December 11, 2023 09:59
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.

3 participants