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

Implements pdf from scratch #706

Merged
merged 7 commits into from
Feb 21, 2023
Merged

Implements pdf from scratch #706

merged 7 commits into from
Feb 21, 2023

Conversation

kevin-atnos
Copy link
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.

2 participants