ninja-labs-tech / verify-pdf

Verify pdf signatures in JS
49 stars 39 forks source link

node-forge incompatibility with node-signpdf #119

Open Frozander opened 2 years ago

Frozander commented 2 years ago

Since node-signpdf now updated their node-forge dependency to 1.2.1 it is incompatible with this module that uses 0.10.0. Updating it directly, expectedly, breaks the code. Meaning it doesn't detect signatures anymore but also doesn't throw out errors.

npm ERR! code 1
npm ERR! path [userpath]/node_modules/@ninja-labs/verify-pdf
npm ERR! command failed
npm ERR! command sh -c npm i ./packages/buffer --no-save
npm ERR! npm ERR! code ERESOLVE
npm ERR! npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! npm ERR! 
npm ERR! npm ERR! While resolving: @ninja-labs/verify-pdf@0.3.9
npm ERR! npm ERR! Found: node-forge@0.10.0
npm ERR! npm ERR! node_modules/node-forge
npm ERR! npm ERR!   node-forge@"^0.10.0" from the root project
npm ERR! npm ERR! 
npm ERR! npm ERR! Could not resolve dependency:
npm ERR! npm ERR! peer node-forge@"^1.2.1" from node-signpdf@1.5.0
npm ERR! npm ERR! node_modules/node-signpdf
npm ERR! npm ERR!   dev node-signpdf@"^1.0.2" from the root project
npm ERR! npm ERR! 
npm ERR! npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR! npm ERR! 
npm ERR! npm ERR! See [userpath]/.npm/eresolve-report.txt for a full report.
npm ERR! 
npm ERR! npm ERR! A complete log of this run can be found in:
npm ERR! npm ERR!     [userpath]/.npm/_logs/2022-04-11T13_43_11_002Z-debug-0.log

npm ERR! A complete log of this run can be found in:
npm ERR!     [userpath]/.npm/_logs/2022-04-11T13_41_31_071Z-debug-0.log
martior commented 2 years ago

selfsigned, a dependency of webpack dev server also needs node-forge "^1"

jhonnyman commented 2 years ago

Hello all, I'm facing this issue as well when upgrading to NodeJS 16. Currently my application uses NodeJS 14 to prevent this issue.

MohammedEssehemy commented 2 years ago

Feel free to open a PR to fix it

carlhauck commented 1 year ago

Feel free to open a PR to fix it

@MohammedEssehemy This PR has been open since February: https://github.com/ninja-labs-tech/verify-pdf/pull/124

carlhauck commented 1 year ago

The reason this needs to be addressed is that node-forge has several vulnerabilities that are addressed by version 1.3.0.

prabjot610 commented 3 months ago

@Frozander or anyone was able to fix this error?

Frozander commented 3 months ago

@Frozander or anyone was able to fix this error?

I swapped to a python library and set up connection between python and js

prabjot610 commented 3 months ago

Perfect!, Could you share the code if that's okay with you? I can clone your rep and add it to my project. I could learn to connect python and js as well. Thanks