diff --git a/package-lock.json b/package-lock.json index ff70988b..5c1e5a6f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,8 +12,8 @@ "@fastify/busboy": "^1.2.1", "@fastify/pre-commit": "^2.2.1", "@solid/acl-check": "^0.4.5", - "@solid/oidc-auth-manager": "^0.24.3", - "@solid/oidc-op": "^0.11.6", + "@solid/oidc-auth-manager": "^0.24.5", + "@solid/oidc-op": "^0.11.7", "async-lock": "^1.4.1", "body-parser": "^1.20.3", "bootstrap": "^3.4.1", @@ -49,12 +49,12 @@ "node-fetch": "^2.7.0", "node-forge": "^1.3.1", "node-mailer": "^0.1.1", - "nodemailer": "^6.10.0", + "nodemailer": "^7.0.10", "nyc": "^15.1.0", "oidc-op-express": "^0.0.3", "owasp-password-strength-test": "^1.3.0", + "rdflib": "^2.3.0", "recursive-readdir": "^2.2.3", - "request": "^2.88.2", "rimraf": "^3.0.2", "solid-auth-client": "^2.5.6", "solid-namespace": "^0.5.4", @@ -4715,6 +4715,8 @@ }, "node_modules/@solid/keychain": { "version": "0.3.4", + "resolved": "https://registry.npmjs.org/@solid/keychain/-/keychain-0.3.4.tgz", + "integrity": "sha512-5WL5bfOc6en1p1iT+elxIOItwLqbPH7i9Vyv4D+ZdnGZOdVfO9lu/X9qgNvjozNG0elQo8lqY7eiLieS/d1C6g==", "license": "MIT", "dependencies": { "@solid/jose": "^0.6.5", @@ -4722,20 +4724,22 @@ } }, "node_modules/@solid/oidc-auth-manager": { - "version": "0.24.3", + "version": "0.24.5", + "resolved": "https://registry.npmjs.org/@solid/oidc-auth-manager/-/oidc-auth-manager-0.24.5.tgz", + "integrity": "sha512-LwQrmQST1WWzr0/R1EYNoJMTiBolzPRwo8KGA6AwIds6IyF34IHpfFKEW6Rb+mLTKgfMzCBe57IeHytzHfA7xw==", "license": "MIT", "dependencies": { - "@solid/oidc-op": "^0.11.6", + "@solid/oidc-op": "^0.11.7", "@solid/oidc-rp": "^0.11.7", - "@solid/oidc-rs": "^0.5.6", + "@solid/oidc-rs": "^0.5.7", "@solid/solid-multi-rp-client": "^0.6.4", "ajv": "^7.2.4", "bcryptjs": "^2.4.3", "fs-extra": "^9.1.0", "kvplus-files": "0.0.4", "li": "^1.3.0", - "node-fetch": "^2.6.7", - "rdflib": "^2.2.20", + "node-fetch": "^2.7.0", + "rdflib": "^2.3.0", "valid-url": "^1.0.9" }, "engines": { @@ -4744,6 +4748,8 @@ }, "node_modules/@solid/oidc-auth-manager/node_modules/fs-extra": { "version": "9.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", + "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", "license": "MIT", "dependencies": { "at-least-node": "^1.0.0", @@ -4756,18 +4762,20 @@ } }, "node_modules/@solid/oidc-op": { - "version": "0.11.6", + "version": "0.11.7", + "resolved": "https://registry.npmjs.org/@solid/oidc-op/-/oidc-op-0.11.7.tgz", + "integrity": "sha512-0IldbryMp0iFV9jQmk9LjWj+m0Un5e20Ck2OC5JbN2shaPn97DABvIIwX2xu6WYEkx7qtl7b1rMT2qEQz++1eg==", "license": "MIT", "dependencies": { - "@solid/jose": "^0.6.5", + "@solid/jose": "^0.6.8", "@solid/keychain": "^0.3.4", "base64url": "^3.0.1", - "debug": "^4.3.1", - "jsonwebtoken": "^8.5.1", + "debug": "^4.4.3", + "jsonwebtoken": "^9.0.2", "jwk-thumbprint": "^0.1.4", - "jwk-to-pem": "^2.0.5", - "qs": "^6.10.1", - "whatwg-url": "^8.5.0" + "jwk-to-pem": "^2.0.7", + "qs": "^6.14.0", + "whatwg-url": "^8.7.0" }, "engines": { "node": ">=10.0" @@ -4775,6 +4783,8 @@ }, "node_modules/@solid/oidc-op/node_modules/tr46": { "version": "2.1.0", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-2.1.0.tgz", + "integrity": "sha512-15Ih7phfcdP5YxqiB+iDtLoaTz4Nd35+IiAv0kQ5FNKHzXgdWqPoTIqEDDJmXceQt4JZk6lVPT8lnDlPpGDppw==", "license": "MIT", "dependencies": { "punycode": "^2.1.1" @@ -4785,6 +4795,8 @@ }, "node_modules/@solid/oidc-op/node_modules/webidl-conversions": { "version": "6.1.0", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-6.1.0.tgz", + "integrity": "sha512-qBIvFLGiBpLjfwmYAaHPXsn+ho5xZnGvyGvsarywGNc8VyQJUMHJ8OBKGGrPER0okBeMDaan4mNBlgBROxuI8w==", "license": "BSD-2-Clause", "engines": { "node": ">=10.4" @@ -4792,6 +4804,8 @@ }, "node_modules/@solid/oidc-op/node_modules/whatwg-url": { "version": "8.7.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-8.7.0.tgz", + "integrity": "sha512-gAojqb/m9Q8a5IV96E3fHJM70AzCkgt4uXYX2O7EmuyOnLrViCQlsEBmF9UQIu3/aeAIp2U17rtbpZWNntQqdg==", "license": "MIT", "dependencies": { "lodash": "^4.7.0", @@ -4847,14 +4861,16 @@ } }, "node_modules/@solid/oidc-rs": { - "version": "0.5.6", + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/@solid/oidc-rs/-/oidc-rs-0.5.7.tgz", + "integrity": "sha512-LE03O//MYVK6Qk09ytj4w0OWM3PY5pgzVbuodNf2HQae/kFc39OHp77PSnOVJRGAtqxlnkXdzI9kA4w2KwG+zA==", "license": "MIT", "dependencies": { "@solid/jose": "^0.6.8", - "jsonwebtoken": "^8.5.1", + "jsonwebtoken": "^9.0.2", "jwk-thumbprint": "^0.1.4", - "jwk-to-pem": "^2.0.5", - "node-fetch": "^2.6.7" + "jwk-to-pem": "^2.0.7", + "node-fetch": "^2.7.0" } }, "node_modules/@solid/solid-auth-oidc": { @@ -4919,6 +4935,8 @@ }, "node_modules/@solid/solid-multi-rp-client": { "version": "0.6.4", + "resolved": "https://registry.npmjs.org/@solid/solid-multi-rp-client/-/solid-multi-rp-client-0.6.4.tgz", + "integrity": "sha512-0rjEfEIwt27nU85XUIt3+UABMS0Nue3PT/FwFLvCcO9ysZKCY4E6ZUKBL7mjrdNAntMdNxtO2wKrNF9zLCuBtg==", "license": "MIT", "dependencies": { "@solid/oidc-rp": "^0.11.5", @@ -5278,6 +5296,8 @@ }, "node_modules/ajv": { "version": "7.2.4", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-7.2.4.tgz", + "integrity": "sha512-nBeQgg/ZZA3u3SYxyaDvpvDtgZ/EZPF547ARgZBrG9Bhu1vKDwAIjtIf+sDtJUKa2zOcEbmRLBRSyMraS/Oy1A==", "license": "MIT", "dependencies": { "fast-deep-equal": "^3.1.1", @@ -5501,13 +5521,6 @@ "version": "0.22.0", "license": "MIT" }, - "node_modules/asn1": { - "version": "0.2.6", - "license": "MIT", - "dependencies": { - "safer-buffer": "~2.1.0" - } - }, "node_modules/asn1.js": { "version": "5.4.1", "license": "MIT", @@ -5541,13 +5554,6 @@ "util": "^0.12.5" } }, - "node_modules/assert-plus": { - "version": "1.0.0", - "license": "MIT", - "engines": { - "node": ">=0.8" - } - }, "node_modules/assertion-error": { "version": "1.1.0", "dev": true, @@ -5586,6 +5592,7 @@ }, "node_modules/asynckit": { "version": "0.4.0", + "dev": true, "license": "MIT" }, "node_modules/at-least-node": { @@ -5612,17 +5619,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/aws-sign2": { - "version": "0.7.0", - "license": "Apache-2.0", - "engines": { - "node": "*" - } - }, - "node_modules/aws4": { - "version": "1.13.2", - "license": "MIT" - }, "node_modules/b64-lite": { "version": "1.4.0", "license": "MIT", @@ -5951,15 +5947,10 @@ "baseline-browser-mapping": "dist/cli.js" } }, - "node_modules/bcrypt-pbkdf": { - "version": "1.0.2", - "license": "BSD-3-Clause", - "dependencies": { - "tweetnacl": "^0.14.3" - } - }, "node_modules/bcryptjs": { "version": "2.4.3", + "resolved": "https://registry.npmjs.org/bcryptjs/-/bcryptjs-2.4.3.tgz", + "integrity": "sha512-V/Hy/X9Vt7f3BbPJEi8BdVFMByHi+jNXrYkW3huaybV/kQ0KJg0Y6PkEMbn+zeT+i+SiKZ/HMqJGIIt4LZDqNQ==", "license": "MIT" }, "node_modules/better-opn": { @@ -6122,6 +6113,8 @@ }, "node_modules/bootstrap": { "version": "3.4.1", + "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-3.4.1.tgz", + "integrity": "sha512-yN5oZVmRCwe5aKwzRj6736nSmKDX7pLYwsXiCj/EYmo16hODaBiT4En5btW/jhBF/seV+XMx3aYwukYC3A49DA==", "deprecated": "This version of Bootstrap is no longer supported. Please upgrade to the latest version.", "license": "MIT", "engines": { @@ -6246,6 +6239,8 @@ }, "node_modules/buffer-equal-constant-time": { "version": "1.0.1", + "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", + "integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==", "license": "BSD-3-Clause" }, "node_modules/buffer-from": { @@ -6365,10 +6360,6 @@ "version": "1.0.8", "license": "Apache-2.0" }, - "node_modules/caseless": { - "version": "0.12.0", - "license": "Apache-2.0" - }, "node_modules/chai": { "version": "4.5.0", "dev": true, @@ -6717,6 +6708,7 @@ }, "node_modules/combined-stream": { "version": "1.0.8", + "dev": true, "license": "MIT", "dependencies": { "delayed-stream": "~1.0.0" @@ -7101,16 +7093,6 @@ "version": "3.1.3", "license": "MIT" }, - "node_modules/dashdash": { - "version": "1.14.1", - "license": "MIT", - "dependencies": { - "assert-plus": "^1.0.0" - }, - "engines": { - "node": ">=0.10" - } - }, "node_modules/data-uri-to-buffer": { "version": "4.0.1", "license": "MIT", @@ -7304,6 +7286,7 @@ }, "node_modules/delayed-stream": { "version": "1.0.0", + "dev": true, "license": "MIT", "engines": { "node": ">=0.4.0" @@ -7485,16 +7468,10 @@ "optional": true, "peer": true }, - "node_modules/ecc-jsbn": { - "version": "0.1.2", - "license": "MIT", - "dependencies": { - "jsbn": "~0.1.0", - "safer-buffer": "^2.1.0" - } - }, "node_modules/ecdsa-sig-formatter": { "version": "1.0.11", + "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz", + "integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==", "license": "Apache-2.0", "dependencies": { "safe-buffer": "^5.0.1" @@ -8767,13 +8744,6 @@ "version": "3.0.2", "license": "MIT" }, - "node_modules/extsprintf": { - "version": "1.3.0", - "engines": [ - "node >=0.6.0" - ], - "license": "MIT" - }, "node_modules/fast-deep-equal": { "version": "3.1.3", "license": "MIT" @@ -8795,6 +8765,7 @@ }, "node_modules/fast-json-stable-stringify": { "version": "2.1.0", + "devOptional": true, "license": "MIT" }, "node_modules/fast-levenshtein": { @@ -9060,25 +9031,6 @@ "node": ">=8.0.0" } }, - "node_modules/forever-agent": { - "version": "0.6.1", - "license": "Apache-2.0", - "engines": { - "node": "*" - } - }, - "node_modules/form-data": { - "version": "2.3.3", - "license": "MIT", - "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.6", - "mime-types": "^2.1.12" - }, - "engines": { - "node": ">= 0.12" - } - }, "node_modules/formdata-polyfill": { "version": "4.0.10", "license": "MIT", @@ -9380,13 +9332,6 @@ "node": ">=6" } }, - "node_modules/getpass": { - "version": "0.1.7", - "license": "MIT", - "dependencies": { - "assert-plus": "^1.0.0" - } - }, "node_modules/glob": { "version": "7.2.3", "deprecated": "Glob versions prior to v9 are no longer supported", @@ -9551,43 +9496,6 @@ "uglify-js": "^3.1.4" } }, - "node_modules/har-schema": { - "version": "2.0.0", - "license": "ISC", - "engines": { - "node": ">=4" - } - }, - "node_modules/har-validator": { - "version": "5.1.5", - "deprecated": "this library is no longer supported", - "license": "MIT", - "dependencies": { - "ajv": "^6.12.3", - "har-schema": "^2.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/har-validator/node_modules/ajv": { - "version": "6.12.6", - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/har-validator/node_modules/json-schema-traverse": { - "version": "0.4.1", - "license": "MIT" - }, "node_modules/has": { "version": "1.0.4", "dev": true, @@ -9835,19 +9743,6 @@ } } }, - "node_modules/http-signature": { - "version": "1.2.0", - "license": "MIT", - "dependencies": { - "assert-plus": "^1.0.0", - "jsprim": "^1.2.2", - "sshpk": "^1.7.0" - }, - "engines": { - "node": ">=0.8", - "npm": ">=1.3.7" - } - }, "node_modules/https-proxy-agent": { "version": "7.0.6", "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.6.tgz", @@ -10579,10 +10474,6 @@ "react-native-securerandom": "^0.1.1" } }, - "node_modules/isstream": { - "version": "0.1.2", - "license": "MIT" - }, "node_modules/issue-pane": { "version": "2.6.1", "license": "MIT", @@ -10927,6 +10818,8 @@ }, "node_modules/js-base64": { "version": "3.7.8", + "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-3.7.8.tgz", + "integrity": "sha512-hNngCeKxIUQiEUN3GPJOkz4wF/YvdUdbNL9hsBcMQTkKzboD7T/q3OYOuuPZLUE6dBxSGpwhk5mwuDud7JVAow==", "license": "BSD-3-Clause" }, "node_modules/js-tokens": { @@ -10944,10 +10837,6 @@ "js-yaml": "bin/js-yaml.js" } }, - "node_modules/jsbn": { - "version": "0.1.1", - "license": "MIT" - }, "node_modules/jsc-safe-url": { "version": "0.2.4", "resolved": "https://registry.npmjs.org/jsc-safe-url/-/jsc-safe-url-0.2.4.tgz", @@ -10976,10 +10865,6 @@ "dev": true, "license": "MIT" }, - "node_modules/json-schema": { - "version": "0.4.0", - "license": "(AFL-2.1 OR BSD-3-Clause)" - }, "node_modules/json-schema-traverse": { "version": "1.0.0", "license": "MIT" @@ -10991,6 +10876,7 @@ }, "node_modules/json-stringify-safe": { "version": "5.0.1", + "dev": true, "license": "ISC" }, "node_modules/json5": { @@ -11027,7 +10913,9 @@ } }, "node_modules/jsonwebtoken": { - "version": "8.5.1", + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.2.tgz", + "integrity": "sha512-PRp66vJ865SSqOlgqS8hujT5U4AOgMfhrwYIuIhfKaoSCZcirrmASQr8CX7cUg+RMih+hgznrjp99o+W4pJLHQ==", "license": "MIT", "dependencies": { "jws": "^3.2.2", @@ -11039,24 +10927,23 @@ "lodash.isstring": "^4.0.1", "lodash.once": "^4.0.0", "ms": "^2.1.1", - "semver": "^5.6.0" + "semver": "^7.5.4" }, "engines": { - "node": ">=4", - "npm": ">=1.4.28" + "node": ">=12", + "npm": ">=6" } }, - "node_modules/jsprim": { - "version": "1.4.2", - "license": "MIT", - "dependencies": { - "assert-plus": "1.0.0", - "extsprintf": "1.3.0", - "json-schema": "0.4.0", - "verror": "1.10.0" + "node_modules/jsonwebtoken/node_modules/semver": { + "version": "7.7.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz", + "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==", + "license": "ISC", + "bin": { + "semver": "bin/semver.js" }, "engines": { - "node": ">=0.6.0" + "node": ">=10" } }, "node_modules/jss": { @@ -11218,6 +11105,8 @@ }, "node_modules/jwa": { "version": "1.4.2", + "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.2.tgz", + "integrity": "sha512-eeH5JO+21J78qMvTIDdBXidBd6nG2kZjg5Ohz/1fpa28Z4CcsWUzJ1ZZyFq/3z3N17aZy+ZuBoHljASbL1WfOw==", "license": "MIT", "dependencies": { "buffer-equal-constant-time": "^1.0.1", @@ -11227,6 +11116,8 @@ }, "node_modules/jwk-thumbprint": { "version": "0.1.4", + "resolved": "https://registry.npmjs.org/jwk-thumbprint/-/jwk-thumbprint-0.1.4.tgz", + "integrity": "sha512-EXIYNd8rfiSWUMsy0FYgvG22NSVBsEFuAo6+P03jON6ZpKK71f/79ibH6lLiYO5rB75td5lBbtLjc79CCQeokg==", "license": "MIT", "dependencies": { "hash.js": "^1.1.7", @@ -11235,6 +11126,8 @@ }, "node_modules/jwk-to-pem": { "version": "2.0.7", + "resolved": "https://registry.npmjs.org/jwk-to-pem/-/jwk-to-pem-2.0.7.tgz", + "integrity": "sha512-cSVphrmWr6reVchuKQZdfSs4U9c5Y4hwZggPoz6cbVnTpAVgGRpEuQng86IyqLeGZlhTh+c4MAreB6KbdQDKHQ==", "license": "Apache-2.0", "dependencies": { "asn1.js": "^5.3.0", @@ -11244,6 +11137,8 @@ }, "node_modules/jws": { "version": "3.2.2", + "resolved": "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz", + "integrity": "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==", "license": "MIT", "dependencies": { "jwa": "^1.4.1", @@ -11271,6 +11166,8 @@ }, "node_modules/kvplus-files": { "version": "0.0.4", + "resolved": "https://registry.npmjs.org/kvplus-files/-/kvplus-files-0.0.4.tgz", + "integrity": "sha512-NLJZH0u+7elv0j2935FwulL5M6w0jr+sqTSGoN68p7sKyuUfpxS3f8Jeix87R1H9YD/PXGHhgWZrq9zosz8N4g==", "license": "MIT", "dependencies": { "fs-extra": "^2.0.0" @@ -11281,6 +11178,8 @@ }, "node_modules/kvplus-files/node_modules/fs-extra": { "version": "2.1.2", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-2.1.2.tgz", + "integrity": "sha512-9ztMtDZtSKC78V8mev+k31qaTabbmuH5jatdvPBMikrFHvw5BqlYnQIn/WGK3WHeRooSTkRvLa2IPlaHjPq5Sg==", "license": "MIT", "dependencies": { "graceful-fs": "^4.1.2", @@ -11289,6 +11188,8 @@ }, "node_modules/kvplus-files/node_modules/jsonfile": { "version": "2.4.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz", + "integrity": "sha512-PKllAqbgLgxHaj8TElYymKCAgrASebJrWpTnEkOaTowt23VKXXN0sUeriJ+eh7y6ufb/CC5ap11pz71/cM0hUw==", "license": "MIT", "optionalDependencies": { "graceful-fs": "^4.1.6" @@ -11885,26 +11786,38 @@ }, "node_modules/lodash.includes": { "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz", + "integrity": "sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w==", "license": "MIT" }, "node_modules/lodash.isboolean": { "version": "3.0.3", + "resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz", + "integrity": "sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg==", "license": "MIT" }, "node_modules/lodash.isinteger": { "version": "4.0.4", + "resolved": "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz", + "integrity": "sha512-DBwtEWN2caHQ9/imiNeEA5ys1JoRtRfY3d7V9wkqtbycnAmTvRRmbHKDV4a0EYc678/dia0jrte4tjYwVBaZUA==", "license": "MIT" }, "node_modules/lodash.isnumber": { "version": "3.0.3", + "resolved": "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz", + "integrity": "sha512-QYqzpfwO3/CWf3XP+Z+tkQsfaLL/EnUlXWVkIk5FUPc4sBdTehEqZONuyRt2P67PXAk+NXmTBcc97zw9t1FQrw==", "license": "MIT" }, "node_modules/lodash.isplainobject": { "version": "4.0.6", + "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", + "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==", "license": "MIT" }, "node_modules/lodash.isstring": { "version": "4.0.1", + "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz", + "integrity": "sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw==", "license": "MIT" }, "node_modules/lodash.merge": { @@ -11914,6 +11827,8 @@ }, "node_modules/lodash.once": { "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", + "integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==", "license": "MIT" }, "node_modules/lodash.sortby": { @@ -13324,7 +13239,9 @@ "license": "MIT" }, "node_modules/nodemailer": { - "version": "6.10.1", + "version": "7.0.10", + "resolved": "https://registry.npmjs.org/nodemailer/-/nodemailer-7.0.10.tgz", + "integrity": "sha512-Us/Se1WtT0ylXgNFfyFSx4LElllVLJXQjWi2Xz17xWw7amDKO2MLtFnVp1WACy7GkVGs+oBlRopVNUzlrGSw1w==", "license": "MIT-0", "engines": { "node": ">=6.0.0" @@ -13514,13 +13431,6 @@ "node": ">=8" } }, - "node_modules/oauth-sign": { - "version": "0.9.0", - "license": "Apache-2.0", - "engines": { - "node": "*" - } - }, "node_modules/ob1": { "version": "0.83.2", "resolved": "https://registry.npmjs.org/ob1/-/ob1-0.83.2.tgz", @@ -14030,10 +13940,6 @@ "node": "*" } }, - "node_modules/performance-now": { - "version": "2.1.0", - "license": "MIT" - }, "node_modules/picocolors": { "version": "1.1.1", "license": "ISC" @@ -14560,16 +14466,6 @@ "node": ">= 0.10" } }, - "node_modules/psl": { - "version": "1.15.0", - "license": "MIT", - "dependencies": { - "punycode": "^2.3.1" - }, - "funding": { - "url": "https://github.com/sponsors/lupomontero" - } - }, "node_modules/punycode": { "version": "2.3.1", "license": "MIT", @@ -14732,6 +14628,8 @@ }, "node_modules/rdflib": { "version": "2.3.0", + "resolved": "https://registry.npmjs.org/rdflib/-/rdflib-2.3.0.tgz", + "integrity": "sha512-Md241rzw8XgGZYfHaQi5SunvaxOVUgjCVTcY4DHZpAkrNPrk93DGoexo6RgulymiR1DkCHRi8C8+Ab+0QmpcYg==", "license": "MIT", "dependencies": { "@babel/runtime": "^7.26.9", @@ -15311,51 +15209,6 @@ "node": ">=4" } }, - "node_modules/request": { - "version": "2.88.2", - "deprecated": "request has been deprecated, see https://github.com/request/request/issues/3142", - "license": "Apache-2.0", - "dependencies": { - "aws-sign2": "~0.7.0", - "aws4": "^1.8.0", - "caseless": "~0.12.0", - "combined-stream": "~1.0.6", - "extend": "~3.0.2", - "forever-agent": "~0.6.1", - "form-data": "~2.3.2", - "har-validator": "~5.1.3", - "http-signature": "~1.2.0", - "is-typedarray": "~1.0.0", - "isstream": "~0.1.2", - "json-stringify-safe": "~5.0.1", - "mime-types": "~2.1.19", - "oauth-sign": "~0.9.0", - "performance-now": "^2.1.0", - "qs": "~6.5.2", - "safe-buffer": "^5.1.2", - "tough-cookie": "~2.5.0", - "tunnel-agent": "^0.6.0", - "uuid": "^3.3.2" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/request/node_modules/qs": { - "version": "6.5.3", - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.6" - } - }, - "node_modules/request/node_modules/uuid": { - "version": "3.4.0", - "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", - "license": "MIT", - "bin": { - "uuid": "bin/uuid" - } - }, "node_modules/require-directory": { "version": "2.1.1", "license": "MIT", @@ -15655,6 +15508,7 @@ }, "node_modules/semver": { "version": "5.7.2", + "dev": true, "license": "ISC", "bin": { "semver": "bin/semver" @@ -16286,29 +16140,6 @@ "version": "1.0.3", "license": "BSD-3-Clause" }, - "node_modules/sshpk": { - "version": "1.18.0", - "license": "MIT", - "dependencies": { - "asn1": "~0.2.3", - "assert-plus": "^1.0.0", - "bcrypt-pbkdf": "^1.0.0", - "dashdash": "^1.12.0", - "ecc-jsbn": "~0.1.1", - "getpass": "^0.1.1", - "jsbn": "~0.1.0", - "safer-buffer": "^2.0.2", - "tweetnacl": "~0.14.0" - }, - "bin": { - "sshpk-conv": "bin/sshpk-conv", - "sshpk-sign": "bin/sshpk-sign", - "sshpk-verify": "bin/sshpk-verify" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/stack-utils": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz", @@ -17289,17 +17120,6 @@ "node": ">=0.6" } }, - "node_modules/tough-cookie": { - "version": "2.5.0", - "license": "BSD-3-Clause", - "dependencies": { - "psl": "^1.1.28", - "punycode": "^2.1.1" - }, - "engines": { - "node": ">=0.8" - } - }, "node_modules/tr46": { "version": "0.0.3", "license": "MIT" @@ -17353,16 +17173,6 @@ "node": ">=0.6.11 <=0.7.0 || >=0.7.3" } }, - "node_modules/tunnel-agent": { - "version": "0.6.0", - "license": "Apache-2.0", - "dependencies": { - "safe-buffer": "^5.0.1" - }, - "engines": { - "node": "*" - } - }, "node_modules/turtle-validator": { "version": "1.1.1", "dev": true, @@ -17377,10 +17187,6 @@ "node": ">=4.0" } }, - "node_modules/tweetnacl": { - "version": "0.14.5", - "license": "Unlicense" - }, "node_modules/type-check": { "version": "0.4.0", "dev": true, @@ -17765,22 +17571,6 @@ "node": ">= 0.8" } }, - "node_modules/verror": { - "version": "1.10.0", - "engines": [ - "node >=0.6.0" - ], - "license": "MIT", - "dependencies": { - "assert-plus": "^1.0.0", - "core-util-is": "1.0.2", - "extsprintf": "^1.2.0" - } - }, - "node_modules/verror/node_modules/core-util-is": { - "version": "1.0.2", - "license": "MIT" - }, "node_modules/vhost": { "version": "3.0.2", "license": "MIT", diff --git a/package.json b/package.json index 6b6de90c..3fbae196 100644 --- a/package.json +++ b/package.json @@ -62,8 +62,8 @@ "@fastify/busboy": "^1.2.1", "@fastify/pre-commit": "^2.2.1", "@solid/acl-check": "^0.4.5", - "@solid/oidc-auth-manager": "^0.24.3", - "@solid/oidc-op": "^0.11.6", + "@solid/oidc-auth-manager": "^0.24.5", + "@solid/oidc-op": "^0.11.7", "async-lock": "^1.4.1", "body-parser": "^1.20.3", "bootstrap": "^3.4.1", @@ -99,12 +99,12 @@ "node-fetch": "^2.7.0", "node-forge": "^1.3.1", "node-mailer": "^0.1.1", - "nodemailer": "^6.10.0", + "nodemailer": "^7.0.10", "nyc": "^15.1.0", "oidc-op-express": "^0.0.3", "owasp-password-strength-test": "^1.3.0", + "rdflib": "^2.3.0", "recursive-readdir": "^2.2.3", - "request": "^2.88.2", "rimraf": "^3.0.2", "solid-auth-client": "^2.5.6", "solid-namespace": "^0.5.4", diff --git a/test/integration/acl-tls-test.js b/test/integration/acl-tls-test.js index 5ca46a2a..ab9f7bfd 100644 --- a/test/integration/acl-tls-test.js +++ b/test/integration/acl-tls-test.js @@ -1,7 +1,7 @@ const assert = require('chai').assert const fs = require('fs-extra') const $rdf = require('rdflib') -const request = require('request') +const { httpRequest: request } = require('../utils') const path = require('path') const { cleanDir } = require('../utils') diff --git a/test/integration/http-copy-test.js b/test/integration/http-copy-test.js index f592b13d..1bf6aa08 100644 --- a/test/integration/http-copy-test.js +++ b/test/integration/http-copy-test.js @@ -1,6 +1,6 @@ const assert = require('chai').assert const fs = require('fs') -const request = require('request') +const { httpRequest: request } = require('../utils') const path = require('path') // Helper functions for the FS const rm = require('./../utils').rm diff --git a/test/integration/special-root-acl-handling.js b/test/integration/special-root-acl-handling.js index 245aa583..e64fa554 100644 --- a/test/integration/special-root-acl-handling.js +++ b/test/integration/special-root-acl-handling.js @@ -1,5 +1,5 @@ const assert = require('chai').assert -const request = require('request') +const { httpRequest: request } = require('../utils') const path = require('path') const { checkDnsSettings, cleanDir } = require('../utils') diff --git a/test/utils.js b/test/utils.js index 33db7783..d11ff425 100644 --- a/test/utils.js +++ b/test/utils.js @@ -5,6 +5,8 @@ const OIDCProvider = require('@solid/oidc-op') const dns = require('dns') const ldnode = require('../index') const supertest = require('supertest') +const fetch = require('node-fetch') +const https = require('https') const TEST_HOSTS = ['nic.localhost', 'tim.localhost', 'nicola.localhost'] @@ -94,3 +96,68 @@ function setupSuperServer (options) { const ldpServer = createServer(options) return supertest(ldpServer) } + +// Lightweight adapter to replace `request` with `node-fetch` in tests +// Supports signatures: +// - request(options, cb) +// - request(url, options, cb) +// And methods: get, post, put, patch, head, delete, del +function buildAgentFn (options = {}) { + const aOpts = options.agentOptions || {} + if (!aOpts || (!aOpts.cert && !aOpts.key)) { + return undefined + } + const httpsAgent = new https.Agent({ + cert: aOpts.cert, + key: aOpts.key, + // Tests often run with NODE_TLS_REJECT_UNAUTHORIZED=0; mirror that here + rejectUnauthorized: false + }) + return (parsedURL) => parsedURL.protocol === 'https:' ? httpsAgent : undefined +} + +async function doFetch (method, url, options = {}, cb) { + try { + const headers = options.headers || {} + const body = options.body + const agent = buildAgentFn(options) + const res = await fetch(url, { method, headers, body, agent }) + // Build a response object similar to `request`'s + const headersObj = {} + res.headers.forEach((value, key) => { headersObj[key] = value }) + const response = { + statusCode: res.status, + statusMessage: res.statusText, + headers: headersObj + } + const hasBody = method !== 'HEAD' + const text = hasBody ? await res.text() : '' + cb(null, response, text) + } catch (err) { + cb(err) + } +} + +function requestAdapter (arg1, arg2, arg3) { + let url, options, cb + if (typeof arg1 === 'string') { + url = arg1 + options = arg2 || {} + cb = arg3 + } else { + options = arg1 || {} + url = options.url + cb = arg2 + } + const method = (options && options.method) || 'GET' + return doFetch(method, url, options, cb) +} + +;['GET', 'POST', 'PUT', 'PATCH', 'HEAD', 'DELETE'].forEach(m => { + const name = m.toLowerCase() + requestAdapter[name] = (options, cb) => doFetch(m, options.url, options, cb) +}) +// Alias +requestAdapter.del = requestAdapter.delete + +exports.httpRequest = requestAdapter