NODE_GOOGLE_TRANSLATE icon indicating copy to clipboard operation
NODE_GOOGLE_TRANSLATE copied to clipboard

Removed security risk `safe-eval` from `package.json`

Open MidSpike opened this issue 4 years ago • 6 comments

removed safe-eval as a dependency

MidSpike avatar Aug 01 '20 18:08 MidSpike

This will fix #12

MidSpike avatar Feb 20 '21 17:02 MidSpike

@MidSpike How do I install your version of this package to remove the critical vulnerabilities brought by 'safe-eval'?

bhawnishk avatar Apr 27 '23 17:04 bhawnishk

@MidSpike How do I install your version of this package to remove the critical vulnerabilities brought by 'safe-eval'?

@bhawnishk I'm not entirely sure if this is correct, but after a quick google search of "npm install github pull request", the following might work:

npm i shikar/NODE_GOOGLE_TRANSLATE#pull/4

However, I feel obligated to inform you that I have since moved on from using this package (and Google Translate) in favor of self-hosting a LibreTranslate instance.

MidSpike avatar Apr 27 '23 18:04 MidSpike

@MidSpike I tried npm i shikar/NODE_GOOGLE_TRANSLATE#pull/4 but keep getting 403 (Forbidden).

Wondering if LibreTranslate works with express API? Would you have any code snippet of the implementation?

I also tried implementing 'translate' npm package which has 0 security vulnerabilities but it keeps throwing import error as it only works with 'import' and not 'require'.

bhawnishk avatar Apr 27 '23 19:04 bhawnishk

@MidSpike I tried npm i shikar/NODE_GOOGLE_TRANSLATE#pull/4 but keep getting 403 (Forbidden).

I just realized you might have to do it with github:: npm i github:shikar/NODE_GOOGLE_TRANSLATE#pull/4

Wondering if LibreTranslate works with express API? Would you have any code snippet of the implementation?

Here you go: https://github.com/MidSpike/iris-utilities/blob/master/src/common/app/libre_translate.ts

MidSpike avatar Apr 27 '23 19:04 MidSpike

npm i github:shikar/NODE_GOOGLE_TRANSLATE#pull/4

Still no chance, getting Error: Response code 403 (Forbidden)\n at translate... /node_modules/translate-google/index.js:168:17)\n

But thanks for suggesting LibreTranslate and for your great contribution for this package.

bhawnishk avatar Apr 27 '23 19:04 bhawnishk