passport-oauth2 icon indicating copy to clipboard operation
passport-oauth2 copied to clipboard

--pending-deprecation DeprecationWarning: `url.parse()`

Open CodeIter opened this issue 1 year ago • 0 comments

Hi, I found a pending deprecation hier:

https://github.com/jaredhanson/passport-oauth2/blob/ea9e99adda82dff67502654347589866fea80eb2/lib/strategy.js#L103

I used This NODE_OPTIONS:

NODE_OPTIONS="--pending-deprecation --throw-deprecation --trace-deprecation"

Output:

+ node server.mjs
node:internal/process/warning:162
        throw warning;
        ^

DeprecationWarning: `url.parse()` behavior is not standardized and prone to errors that have security implications. Use the WHATWG URL API instead. CVEs are not issued for `url.parse()` vulnerabilities.
    at Object.urlParse [as parse] (node:url:154:13)
    at Strategy.OAuth2Strategy (.../myproject/node_modules/.pnpm/[email protected]/node_modules/passport-oauth2/lib/strategy.js:103:54)
    at new Strategy (.../myproject/node_modules/.pnpm/[email protected]/node_modules/passport-facebook/lib/strategy.js:56:18)
    at file://.../myproject/src/auth/strategy/facebook.mjs:7:33
    at ModuleJob.run (node:internal/modules/esm/module_job:192:25) {
  code: 'DEP0169'
}

Node.js v20.2.0

Fail : Code status 1

CodeIter avatar Jan 14 '24 15:01 CodeIter