Skip to content

--pending-deprecation DeprecationWarning: url.parse() #181

Open
@CodeIter

Description

@CodeIter

Hi, I found a pending deprecation hier:

this._key = options.sessionKey || ('oauth2:' + url.parse(options.authorizationURL).hostname);

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions