Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes [GHSA-wgrm-67xf-hhpq](GHSA-wgrm-67xf-hhpq)
- Loading branch information
Fixes [GHSA-wgrm-67xf-hhpq](GHSA-wgrm-67xf-hhpq)
671e6ea
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @wojtekmaj ,
We are using v4.2.0 and recently got a security issue mentioning isEvalSupported: true can cause issues.
I bumped react-pdf to v7.* which should fix the security thread with isEvalSupported: false but I'm getting typing issues.
One of the issue:
We are using component and passing customTextRenderer as:
customTextRederer = (textInfo: { str: string; itemIndex: number }) => {
return (
<span
<..Some span attributes>
);
};
while building the project getting error:
_```
Type '(textInfo: { str: string; itemIndex: number;}) => React.JSX.Element' is not assignable to type 'CustomTextRenderer'.
ERR! Type 'Element' is not assignable to type 'string'.
ERR!
ERR! 117 customTextRenderer={this.customTextRenderer}
ERR! ~~~~~~~~~~~~~~~~~~
export type CustomTextRenderer = (props: {
pageIndex: number;
pageNumber: number;
itemIndex: number;
} & TextItem) => string;
671e6ea
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Path for upgrade is clearly outlined both in Wiki and release notes for every major version.
Only v7 and v8 have received a patch and I'm not planning to support older versions.
Read more: #1786