Merge pull request #16749 from overleaf/td-upgrade-joi-celebrate

Upgrade Joi and Celebrate to latest

GitOrigin-RevId: 287130f6e476c04f9eb4efdf202729452b081c40
This commit is contained in:
Tim Down 2024-02-02 11:49:05 +00:00 committed by Copybot
parent 0596e8d25c
commit 473e74ecf1
8 changed files with 112 additions and 434 deletions

464
package-lock.json generated
View file

@ -6135,20 +6135,6 @@
"node": ">=10.13.0" "node": ">=10.13.0"
} }
}, },
"node_modules/@hapi/address": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/@hapi/address/-/address-4.1.0.tgz",
"integrity": "sha512-SkszZf13HVgGmChdHo/PxchnSaCJ6cetVqLzyciudzZRT0jcOouIF/Q93mgjw8cce+D+4F4C1Z/WrfFN+O3VHQ==",
"deprecated": "Moved to 'npm install @sideway/address'",
"dependencies": {
"@hapi/hoek": "^9.0.0"
}
},
"node_modules/@hapi/address/node_modules/@hapi/hoek": {
"version": "9.2.1",
"resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.2.1.tgz",
"integrity": "sha512-gfta+H8aziZsm8pZa0vj04KO6biEiisppNgA1kbJvFrrWu9Vm7eaUEy76DIxsuTaWvti5fkJVhllWc6ZTE+Mdw=="
},
"node_modules/@hapi/b64": { "node_modules/@hapi/b64": {
"version": "5.0.0", "version": "5.0.0",
"resolved": "https://registry.npmjs.org/@hapi/b64/-/b64-5.0.0.tgz", "resolved": "https://registry.npmjs.org/@hapi/b64/-/b64-5.0.0.tgz",
@ -6157,11 +6143,6 @@
"@hapi/hoek": "9.x.x" "@hapi/hoek": "9.x.x"
} }
}, },
"node_modules/@hapi/b64/node_modules/@hapi/hoek": {
"version": "9.3.0",
"resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.3.0.tgz",
"integrity": "sha512-/c6rf4UJlmHlC9b5BaNvzAcFv7HZ2QHaV0D4/HNlBdvFnvQq8RI4kYdhyPCl7Xj+oWvTWQ8ujhqS53LIgAe6KQ=="
},
"node_modules/@hapi/boom": { "node_modules/@hapi/boom": {
"version": "9.1.4", "version": "9.1.4",
"resolved": "https://registry.npmjs.org/@hapi/boom/-/boom-9.1.4.tgz", "resolved": "https://registry.npmjs.org/@hapi/boom/-/boom-9.1.4.tgz",
@ -6170,17 +6151,6 @@
"@hapi/hoek": "9.x.x" "@hapi/hoek": "9.x.x"
} }
}, },
"node_modules/@hapi/boom/node_modules/@hapi/hoek": {
"version": "9.3.0",
"resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.3.0.tgz",
"integrity": "sha512-/c6rf4UJlmHlC9b5BaNvzAcFv7HZ2QHaV0D4/HNlBdvFnvQq8RI4kYdhyPCl7Xj+oWvTWQ8ujhqS53LIgAe6KQ=="
},
"node_modules/@hapi/bourne": {
"version": "1.3.2",
"resolved": "https://registry.npmjs.org/@hapi/bourne/-/bourne-1.3.2.tgz",
"integrity": "sha512-1dVNHT76Uu5N3eJNTYcvxee+jzX4Z9lfciqRRHCU27ihbUcYi+iSc2iml5Ke1LXe1SyJCLA0+14Jh4tXJgOppA==",
"deprecated": "This version has been deprecated and is no longer supported or maintained"
},
"node_modules/@hapi/cryptiles": { "node_modules/@hapi/cryptiles": {
"version": "5.1.0", "version": "5.1.0",
"resolved": "https://registry.npmjs.org/@hapi/cryptiles/-/cryptiles-5.1.0.tgz", "resolved": "https://registry.npmjs.org/@hapi/cryptiles/-/cryptiles-5.1.0.tgz",
@ -6192,17 +6162,10 @@
"node": ">=12.0.0" "node": ">=12.0.0"
} }
}, },
"node_modules/@hapi/formula": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/@hapi/formula/-/formula-2.0.0.tgz",
"integrity": "sha512-V87P8fv7PI0LH7LiVi8Lkf3x+KCO7pQozXRssAHNXXL9L1K+uyu4XypLXwxqVDKgyQai6qj3/KteNlrqDx4W5A==",
"deprecated": "Moved to 'npm install @sideway/formula'"
},
"node_modules/@hapi/hoek": { "node_modules/@hapi/hoek": {
"version": "8.5.1", "version": "9.3.0",
"resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.5.1.tgz", "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.3.0.tgz",
"integrity": "sha512-yN7kbciD87WzLGc5539Tn0sApjyiGHAJgKvG9W8C7O+6c7qmoQMfVs0W4bX17eqz6C78QJqqFrtgdK5EWf6Qow==", "integrity": "sha512-/c6rf4UJlmHlC9b5BaNvzAcFv7HZ2QHaV0D4/HNlBdvFnvQq8RI4kYdhyPCl7Xj+oWvTWQ8ujhqS53LIgAe6KQ=="
"deprecated": "This version has been deprecated and is no longer supported or maintained"
}, },
"node_modules/@hapi/iron": { "node_modules/@hapi/iron": {
"version": "6.0.0", "version": "6.0.0",
@ -6221,35 +6184,6 @@
"resolved": "https://registry.npmjs.org/@hapi/bourne/-/bourne-2.1.0.tgz", "resolved": "https://registry.npmjs.org/@hapi/bourne/-/bourne-2.1.0.tgz",
"integrity": "sha512-i1BpaNDVLJdRBEKeJWkVO6tYX6DMFBuwMhSuWqLsY4ufeTKGVuV5rBsUhxPayXqnnWHgXUAmWK16H/ykO5Wj4Q==" "integrity": "sha512-i1BpaNDVLJdRBEKeJWkVO6tYX6DMFBuwMhSuWqLsY4ufeTKGVuV5rBsUhxPayXqnnWHgXUAmWK16H/ykO5Wj4Q=="
}, },
"node_modules/@hapi/iron/node_modules/@hapi/hoek": {
"version": "9.3.0",
"resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.3.0.tgz",
"integrity": "sha512-/c6rf4UJlmHlC9b5BaNvzAcFv7HZ2QHaV0D4/HNlBdvFnvQq8RI4kYdhyPCl7Xj+oWvTWQ8ujhqS53LIgAe6KQ=="
},
"node_modules/@hapi/joi": {
"version": "17.1.1",
"resolved": "https://registry.npmjs.org/@hapi/joi/-/joi-17.1.1.tgz",
"integrity": "sha512-p4DKeZAoeZW4g3u7ZeRo+vCDuSDgSvtsB/NpfjXEHTUjSeINAi/RrVOWiVQ1isaoLzMvFEhe8n5065mQq1AdQg==",
"deprecated": "Switch to 'npm install joi'",
"dependencies": {
"@hapi/address": "^4.0.1",
"@hapi/formula": "^2.0.0",
"@hapi/hoek": "^9.0.0",
"@hapi/pinpoint": "^2.0.0",
"@hapi/topo": "^5.0.0"
}
},
"node_modules/@hapi/joi/node_modules/@hapi/hoek": {
"version": "9.2.1",
"resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.2.1.tgz",
"integrity": "sha512-gfta+H8aziZsm8pZa0vj04KO6biEiisppNgA1kbJvFrrWu9Vm7eaUEy76DIxsuTaWvti5fkJVhllWc6ZTE+Mdw=="
},
"node_modules/@hapi/pinpoint": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/@hapi/pinpoint/-/pinpoint-2.0.0.tgz",
"integrity": "sha512-vzXR5MY7n4XeIvLpfl3HtE3coZYO4raKXW766R6DZw/6aLqR26iuZ109K7a0NtF2Db0jxqh7xz2AxkUwpUFybw==",
"deprecated": "Moved to 'npm install @sideway/pinpoint'"
},
"node_modules/@hapi/podium": { "node_modules/@hapi/podium": {
"version": "4.1.3", "version": "4.1.3",
"resolved": "https://registry.npmjs.org/@hapi/podium/-/podium-4.1.3.tgz", "resolved": "https://registry.npmjs.org/@hapi/podium/-/podium-4.1.3.tgz",
@ -6260,11 +6194,6 @@
"@hapi/validate": "1.x.x" "@hapi/validate": "1.x.x"
} }
}, },
"node_modules/@hapi/podium/node_modules/@hapi/hoek": {
"version": "9.3.0",
"resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.3.0.tgz",
"integrity": "sha512-/c6rf4UJlmHlC9b5BaNvzAcFv7HZ2QHaV0D4/HNlBdvFnvQq8RI4kYdhyPCl7Xj+oWvTWQ8ujhqS53LIgAe6KQ=="
},
"node_modules/@hapi/teamwork": { "node_modules/@hapi/teamwork": {
"version": "5.1.1", "version": "5.1.1",
"resolved": "https://registry.npmjs.org/@hapi/teamwork/-/teamwork-5.1.1.tgz", "resolved": "https://registry.npmjs.org/@hapi/teamwork/-/teamwork-5.1.1.tgz",
@ -6281,11 +6210,6 @@
"@hapi/hoek": "^9.0.0" "@hapi/hoek": "^9.0.0"
} }
}, },
"node_modules/@hapi/topo/node_modules/@hapi/hoek": {
"version": "9.2.1",
"resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.2.1.tgz",
"integrity": "sha512-gfta+H8aziZsm8pZa0vj04KO6biEiisppNgA1kbJvFrrWu9Vm7eaUEy76DIxsuTaWvti5fkJVhllWc6ZTE+Mdw=="
},
"node_modules/@hapi/validate": { "node_modules/@hapi/validate": {
"version": "1.1.3", "version": "1.1.3",
"resolved": "https://registry.npmjs.org/@hapi/validate/-/validate-1.1.3.tgz", "resolved": "https://registry.npmjs.org/@hapi/validate/-/validate-1.1.3.tgz",
@ -6295,11 +6219,6 @@
"@hapi/topo": "^5.0.0" "@hapi/topo": "^5.0.0"
} }
}, },
"node_modules/@hapi/validate/node_modules/@hapi/hoek": {
"version": "9.3.0",
"resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.3.0.tgz",
"integrity": "sha512-/c6rf4UJlmHlC9b5BaNvzAcFv7HZ2QHaV0D4/HNlBdvFnvQq8RI4kYdhyPCl7Xj+oWvTWQ8ujhqS53LIgAe6KQ=="
},
"node_modules/@hapi/wreck": { "node_modules/@hapi/wreck": {
"version": "18.0.1", "version": "18.0.1",
"resolved": "https://registry.npmjs.org/@hapi/wreck/-/wreck-18.0.1.tgz", "resolved": "https://registry.npmjs.org/@hapi/wreck/-/wreck-18.0.1.tgz",
@ -10157,18 +10076,13 @@
"integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg=="
}, },
"node_modules/@sideway/address": { "node_modules/@sideway/address": {
"version": "4.1.3", "version": "4.1.4",
"resolved": "https://registry.npmjs.org/@sideway/address/-/address-4.1.3.tgz", "resolved": "https://registry.npmjs.org/@sideway/address/-/address-4.1.4.tgz",
"integrity": "sha512-8ncEUtmnTsMmL7z1YPB47kPUq7LpKWJNFPsRzHiIajGC5uXlWGn+AmkYPcHNl8S4tcEGx+cnORnNYaw2wvL+LQ==", "integrity": "sha512-7vwq+rOHVWjyXxVlR76Agnvhy8I9rpzjosTESvmhNeXOXdZZB15Fl+TI9x1SiHZH5Jv2wTGduSxFDIaq0m3DUw==",
"dependencies": { "dependencies": {
"@hapi/hoek": "^9.0.0" "@hapi/hoek": "^9.0.0"
} }
}, },
"node_modules/@sideway/address/node_modules/@hapi/hoek": {
"version": "9.2.1",
"resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.2.1.tgz",
"integrity": "sha512-gfta+H8aziZsm8pZa0vj04KO6biEiisppNgA1kbJvFrrWu9Vm7eaUEy76DIxsuTaWvti5fkJVhllWc6ZTE+Mdw=="
},
"node_modules/@sideway/formula": { "node_modules/@sideway/formula": {
"version": "3.0.1", "version": "3.0.1",
"resolved": "https://registry.npmjs.org/@sideway/formula/-/formula-3.0.1.tgz", "resolved": "https://registry.npmjs.org/@sideway/formula/-/formula-3.0.1.tgz",
@ -15703,11 +15617,6 @@
"joi": "^17.3.0" "joi": "^17.3.0"
} }
}, },
"node_modules/@types/hapi__joi": {
"version": "17.1.8",
"resolved": "https://registry.npmjs.org/@types/hapi__joi/-/hapi__joi-17.1.8.tgz",
"integrity": "sha512-omVytnOAiAfzGUOQArujJr3heWxPrDHW7MF1ieqix1ngoGdhtJmSSDFVM+ZAOa7UmhlGJtltdgUAT03mfDu6kg=="
},
"node_modules/@types/hapi__mimos": { "node_modules/@types/hapi__mimos": {
"version": "4.1.4", "version": "4.1.4",
"resolved": "https://registry.npmjs.org/@types/hapi__mimos/-/hapi__mimos-4.1.4.tgz", "resolved": "https://registry.npmjs.org/@types/hapi__mimos/-/hapi__mimos-4.1.4.tgz",
@ -19254,13 +19163,12 @@
} }
}, },
"node_modules/celebrate": { "node_modules/celebrate": {
"version": "12.2.0", "version": "15.0.3",
"resolved": "https://registry.npmjs.org/celebrate/-/celebrate-12.2.0.tgz", "resolved": "https://registry.npmjs.org/celebrate/-/celebrate-15.0.3.tgz",
"integrity": "sha512-dkcQaUL4zrPOua/NwTM74jf/NY3wv9Fyb1mkC2ru75KRHowSIDe/tJtIG9yRyPyFCfkr1odif8zNQq23eTwEYg==", "integrity": "sha512-ToF8ILq/F0KhQ0CPtexP7Cu9GkqKJ91VKy3ZOCV24aaNWdm3QCHqnXAKfKHrtcM2B2zmPFe11p8WWsQkmq8k4g==",
"dependencies": { "dependencies": {
"@hapi/joi": "17.x.x",
"@types/hapi__joi": "17.x.x",
"escape-html": "1.0.3", "escape-html": "1.0.3",
"joi": "17.x.x",
"lodash": "4.17.x" "lodash": "4.17.x"
} }
}, },
@ -29006,22 +28914,17 @@
} }
}, },
"node_modules/joi": { "node_modules/joi": {
"version": "17.9.2", "version": "17.12.0",
"resolved": "https://registry.npmjs.org/joi/-/joi-17.9.2.tgz", "resolved": "https://registry.npmjs.org/joi/-/joi-17.12.0.tgz",
"integrity": "sha512-Itk/r+V4Dx0V3c7RLFdRh12IOjySm2/WGPMubBT92cQvRfYZhPM2W0hZlctjj72iES8jsRCwp7S/cRmWBnJ4nw==", "integrity": "sha512-HSLsmSmXz+PV9PYoi3p7cgIbj06WnEBNT28n+bbBNcPZXZFqCzzvGqpTBPujx/Z0nh1+KNQPDrNgdmQ8dq0qYw==",
"dependencies": { "dependencies": {
"@hapi/hoek": "^9.0.0", "@hapi/hoek": "^9.3.0",
"@hapi/topo": "^5.0.0", "@hapi/topo": "^5.1.0",
"@sideway/address": "^4.1.3", "@sideway/address": "^4.1.4",
"@sideway/formula": "^3.0.1", "@sideway/formula": "^3.0.1",
"@sideway/pinpoint": "^2.0.0" "@sideway/pinpoint": "^2.0.0"
} }
}, },
"node_modules/joi/node_modules/@hapi/hoek": {
"version": "9.2.1",
"resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.2.1.tgz",
"integrity": "sha512-gfta+H8aziZsm8pZa0vj04KO6biEiisppNgA1kbJvFrrWu9Vm7eaUEy76DIxsuTaWvti5fkJVhllWc6ZTE+Mdw=="
},
"node_modules/jose": { "node_modules/jose": {
"version": "4.11.2", "version": "4.11.2",
"resolved": "https://registry.npmjs.org/jose/-/jose-4.11.2.tgz", "resolved": "https://registry.npmjs.org/jose/-/jose-4.11.2.tgz",
@ -43099,11 +43002,11 @@
"body-parser": "^1.19.0", "body-parser": "^1.19.0",
"bull": "^3.18.0", "bull": "^3.18.0",
"camelcase-keys": "^4.2.0", "camelcase-keys": "^4.2.0",
"celebrate": "^12.1.1", "celebrate": "^15.0.3",
"csv": "^5.4.0", "csv": "^5.4.0",
"east": "^2.0.3", "east": "^2.0.3",
"express": "^4.18.2", "express": "^4.18.2",
"joi": "^17.2.1", "joi": "^17.12.0",
"json2csv": "^4.5.4", "json2csv": "^4.5.4",
"lodash": "^4.17.21", "lodash": "^4.17.21",
"minimist": "^1.2.7", "minimist": "^1.2.7",
@ -43561,7 +43464,7 @@
"body-parser": "^1.19.0", "body-parser": "^1.19.0",
"bson": "^1.1.4", "bson": "^1.1.4",
"bunyan": "^1.8.15", "bunyan": "^1.8.15",
"celebrate": "^13.0.4", "celebrate": "^15.0.3",
"express": "^4.18.2", "express": "^4.18.2",
"lodash": "^4.17.21", "lodash": "^4.17.21",
"mongodb": "^6.2.0", "mongodb": "^6.2.0",
@ -43580,16 +43483,6 @@
"typescript": "^5.0.4" "typescript": "^5.0.4"
} }
}, },
"services/docstore/node_modules/celebrate": {
"version": "13.0.4",
"resolved": "https://registry.npmjs.org/celebrate/-/celebrate-13.0.4.tgz",
"integrity": "sha512-gUtAjEtFyY9PvuuQJq1uyuF46gLetVZzyUKXBDBqqvgzCjTSfwXP8L+WcGt1NrLQvUxXdlzhFolW2Bt9DDEV+g==",
"dependencies": {
"escape-html": "1.0.3",
"joi": "17.x.x",
"lodash": "4.17.x"
}
},
"services/docstore/node_modules/diff": { "services/docstore/node_modules/diff": {
"version": "4.0.2", "version": "4.0.2",
"resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz",
@ -45576,7 +45469,7 @@
"body-parser": "^1.19.0", "body-parser": "^1.19.0",
"bunyan": "^1.8.15", "bunyan": "^1.8.15",
"byline": "^4.2.1", "byline": "^4.2.1",
"celebrate": "^10.1.0", "celebrate": "^15.0.3",
"cli": "^1.0.1", "cli": "^1.0.1",
"diff-match-patch": "overleaf/diff-match-patch#89805f9c671a77a263fc53461acd62aa7498f688", "diff-match-patch": "overleaf/diff-match-patch#89805f9c671a77a263fc53461acd62aa7498f688",
"esmock": "^2.1.0", "esmock": "^2.1.0",
@ -45602,46 +45495,6 @@
"typescript": "^5.0.4" "typescript": "^5.0.4"
} }
}, },
"services/project-history/node_modules/@hapi/address": {
"version": "2.1.4",
"resolved": "https://registry.npmjs.org/@hapi/address/-/address-2.1.4.tgz",
"integrity": "sha512-QD1PhQk+s31P1ixsX0H0Suoupp3VMXzIVMSwobR3F3MSUO2YCV0B7xqLcUw/Bh8yuvd3LhpyqLQWTNcRmp6IdQ==",
"deprecated": "Moved to 'npm install @sideway/address'"
},
"services/project-history/node_modules/@hapi/joi": {
"version": "15.1.1",
"resolved": "https://registry.npmjs.org/@hapi/joi/-/joi-15.1.1.tgz",
"integrity": "sha512-entf8ZMOK8sc+8YfeOlM8pCfg3b5+WZIKBfUaaJT8UsjAAPjartzxIYm3TIbjvA4u+u++KbcXD38k682nVHDAQ==",
"deprecated": "Switch to 'npm install joi'",
"dependencies": {
"@hapi/address": "2.x.x",
"@hapi/bourne": "1.x.x",
"@hapi/hoek": "8.x.x",
"@hapi/topo": "3.x.x"
}
},
"services/project-history/node_modules/@hapi/topo": {
"version": "3.1.6",
"resolved": "https://registry.npmjs.org/@hapi/topo/-/topo-3.1.6.tgz",
"integrity": "sha512-tAag0jEcjwH+P2quUfipd7liWCNX2F8NvYjQp2wtInsZxnMlypdw0FtAOLxtvvkO+GSRRbmNi8m/5y42PQJYCQ==",
"deprecated": "This version has been deprecated and is no longer supported or maintained",
"dependencies": {
"@hapi/hoek": "^8.3.0"
}
},
"services/project-history/node_modules/celebrate": {
"version": "10.1.0",
"resolved": "https://registry.npmjs.org/celebrate/-/celebrate-10.1.0.tgz",
"integrity": "sha512-Ybkb+/mek6nl4HZljFGUtma8r1Dq0ClYiHf5RVV3msoDFRsJlAFIR8J6+dKwL4EhgihIPFdBOMc6KFO9izMA9g==",
"dependencies": {
"@hapi/joi": "15.x.x",
"escape-html": "1.0.3",
"lodash.get": "4.4.x"
},
"engines": {
"node": ">=8.9.0"
}
},
"services/project-history/node_modules/debug": { "services/project-history/node_modules/debug": {
"version": "4.3.4", "version": "4.3.4",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
@ -45732,7 +45585,6 @@
"services/real-time": { "services/real-time": {
"name": "@overleaf/real-time", "name": "@overleaf/real-time",
"dependencies": { "dependencies": {
"@hapi/joi": "^17.1.1",
"@overleaf/logger": "*", "@overleaf/logger": "*",
"@overleaf/metrics": "*", "@overleaf/metrics": "*",
"@overleaf/o-error": "*", "@overleaf/o-error": "*",
@ -45746,6 +45598,7 @@
"cookie-parser": "^1.4.5", "cookie-parser": "^1.4.5",
"express": "^4.18.2", "express": "^4.18.2",
"express-session": "^1.17.1", "express-session": "^1.17.1",
"joi": "^17.12.0",
"proxy-addr": "^2.0.7", "proxy-addr": "^2.0.7",
"request": "^2.88.2", "request": "^2.88.2",
"socket.io": "github:overleaf/socket.io#0.9.19-overleaf-10", "socket.io": "github:overleaf/socket.io#0.9.19-overleaf-10",
@ -46232,7 +46085,7 @@
"bull": "^3.18.0", "bull": "^3.18.0",
"bunyan": "^1.8.15", "bunyan": "^1.8.15",
"cache-flow": "^1.9.0", "cache-flow": "^1.9.0",
"celebrate": "^10.0.1", "celebrate": "^15.0.3",
"connect-redis": "^6.1.3", "connect-redis": "^6.1.3",
"content-disposition": "^0.5.0", "content-disposition": "^0.5.0",
"contentful": "^6.1.1", "contentful": "^6.1.1",
@ -46256,6 +46109,7 @@
"i18next": "^23.5.1", "i18next": "^23.5.1",
"i18next-fs-backend": "^2.2.0", "i18next-fs-backend": "^2.2.0",
"i18next-http-middleware": "^3.4.1", "i18next-http-middleware": "^3.4.1",
"joi": "^17.12.0",
"jose": "^4.3.8", "jose": "^4.3.8",
"json2csv": "^4.3.3", "json2csv": "^4.3.3",
"jsonwebtoken": "^9.0.0", "jsonwebtoken": "^9.0.0",
@ -46587,33 +46441,6 @@
"node": ">=12" "node": ">=12"
} }
}, },
"services/web/node_modules/@hapi/address": {
"version": "2.1.4",
"resolved": "https://registry.npmjs.org/@hapi/address/-/address-2.1.4.tgz",
"integrity": "sha512-QD1PhQk+s31P1ixsX0H0Suoupp3VMXzIVMSwobR3F3MSUO2YCV0B7xqLcUw/Bh8yuvd3LhpyqLQWTNcRmp6IdQ==",
"deprecated": "Moved to 'npm install @sideway/address'"
},
"services/web/node_modules/@hapi/joi": {
"version": "15.1.1",
"resolved": "https://registry.npmjs.org/@hapi/joi/-/joi-15.1.1.tgz",
"integrity": "sha512-entf8ZMOK8sc+8YfeOlM8pCfg3b5+WZIKBfUaaJT8UsjAAPjartzxIYm3TIbjvA4u+u++KbcXD38k682nVHDAQ==",
"deprecated": "Switch to 'npm install joi'",
"dependencies": {
"@hapi/address": "2.x.x",
"@hapi/bourne": "1.x.x",
"@hapi/hoek": "8.x.x",
"@hapi/topo": "3.x.x"
}
},
"services/web/node_modules/@hapi/topo": {
"version": "3.1.6",
"resolved": "https://registry.npmjs.org/@hapi/topo/-/topo-3.1.6.tgz",
"integrity": "sha512-tAag0jEcjwH+P2quUfipd7liWCNX2F8NvYjQp2wtInsZxnMlypdw0FtAOLxtvvkO+GSRRbmNi8m/5y42PQJYCQ==",
"deprecated": "This version has been deprecated and is no longer supported or maintained",
"dependencies": {
"@hapi/hoek": "^8.3.0"
}
},
"services/web/node_modules/@opentelemetry/auto-instrumentations-web": { "services/web/node_modules/@opentelemetry/auto-instrumentations-web": {
"version": "0.33.1", "version": "0.33.1",
"resolved": "https://registry.npmjs.org/@opentelemetry/auto-instrumentations-web/-/auto-instrumentations-web-0.33.1.tgz", "resolved": "https://registry.npmjs.org/@opentelemetry/auto-instrumentations-web/-/auto-instrumentations-web-0.33.1.tgz",
@ -47243,19 +47070,6 @@
"node": ">=10.16.0" "node": ">=10.16.0"
} }
}, },
"services/web/node_modules/celebrate": {
"version": "10.1.0",
"resolved": "https://registry.npmjs.org/celebrate/-/celebrate-10.1.0.tgz",
"integrity": "sha512-Ybkb+/mek6nl4HZljFGUtma8r1Dq0ClYiHf5RVV3msoDFRsJlAFIR8J6+dKwL4EhgihIPFdBOMc6KFO9izMA9g==",
"dependencies": {
"@hapi/joi": "15.x.x",
"escape-html": "1.0.3",
"lodash.get": "4.4.x"
},
"engines": {
"node": ">=8.9.0"
}
},
"services/web/node_modules/chalk": { "services/web/node_modules/chalk": {
"version": "4.1.2", "version": "4.1.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
@ -51823,34 +51637,12 @@
"is-negated-glob": "^1.0.0" "is-negated-glob": "^1.0.0"
} }
}, },
"@hapi/address": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/@hapi/address/-/address-4.1.0.tgz",
"integrity": "sha512-SkszZf13HVgGmChdHo/PxchnSaCJ6cetVqLzyciudzZRT0jcOouIF/Q93mgjw8cce+D+4F4C1Z/WrfFN+O3VHQ==",
"requires": {
"@hapi/hoek": "^9.0.0"
},
"dependencies": {
"@hapi/hoek": {
"version": "9.2.1",
"resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.2.1.tgz",
"integrity": "sha512-gfta+H8aziZsm8pZa0vj04KO6biEiisppNgA1kbJvFrrWu9Vm7eaUEy76DIxsuTaWvti5fkJVhllWc6ZTE+Mdw=="
}
}
},
"@hapi/b64": { "@hapi/b64": {
"version": "5.0.0", "version": "5.0.0",
"resolved": "https://registry.npmjs.org/@hapi/b64/-/b64-5.0.0.tgz", "resolved": "https://registry.npmjs.org/@hapi/b64/-/b64-5.0.0.tgz",
"integrity": "sha512-ngu0tSEmrezoiIaNGG6rRvKOUkUuDdf4XTPnONHGYfSGRmDqPZX5oJL6HAdKTo1UQHECbdB4OzhWrfgVppjHUw==", "integrity": "sha512-ngu0tSEmrezoiIaNGG6rRvKOUkUuDdf4XTPnONHGYfSGRmDqPZX5oJL6HAdKTo1UQHECbdB4OzhWrfgVppjHUw==",
"requires": { "requires": {
"@hapi/hoek": "9.x.x" "@hapi/hoek": "9.x.x"
},
"dependencies": {
"@hapi/hoek": {
"version": "9.3.0",
"resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.3.0.tgz",
"integrity": "sha512-/c6rf4UJlmHlC9b5BaNvzAcFv7HZ2QHaV0D4/HNlBdvFnvQq8RI4kYdhyPCl7Xj+oWvTWQ8ujhqS53LIgAe6KQ=="
}
} }
}, },
"@hapi/boom": { "@hapi/boom": {
@ -51859,19 +51651,7 @@
"integrity": "sha512-Ls1oH8jaN1vNsqcaHVYJrKmgMcKsC1wcp8bujvXrHaAqD2iDYq3HoOwsxwo09Cuda5R5nC0o0IxlrlTuvPuzSw==", "integrity": "sha512-Ls1oH8jaN1vNsqcaHVYJrKmgMcKsC1wcp8bujvXrHaAqD2iDYq3HoOwsxwo09Cuda5R5nC0o0IxlrlTuvPuzSw==",
"requires": { "requires": {
"@hapi/hoek": "9.x.x" "@hapi/hoek": "9.x.x"
},
"dependencies": {
"@hapi/hoek": {
"version": "9.3.0",
"resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.3.0.tgz",
"integrity": "sha512-/c6rf4UJlmHlC9b5BaNvzAcFv7HZ2QHaV0D4/HNlBdvFnvQq8RI4kYdhyPCl7Xj+oWvTWQ8ujhqS53LIgAe6KQ=="
} }
}
},
"@hapi/bourne": {
"version": "1.3.2",
"resolved": "https://registry.npmjs.org/@hapi/bourne/-/bourne-1.3.2.tgz",
"integrity": "sha512-1dVNHT76Uu5N3eJNTYcvxee+jzX4Z9lfciqRRHCU27ihbUcYi+iSc2iml5Ke1LXe1SyJCLA0+14Jh4tXJgOppA=="
}, },
"@hapi/cryptiles": { "@hapi/cryptiles": {
"version": "5.1.0", "version": "5.1.0",
@ -51881,15 +51661,10 @@
"@hapi/boom": "9.x.x" "@hapi/boom": "9.x.x"
} }
}, },
"@hapi/formula": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/@hapi/formula/-/formula-2.0.0.tgz",
"integrity": "sha512-V87P8fv7PI0LH7LiVi8Lkf3x+KCO7pQozXRssAHNXXL9L1K+uyu4XypLXwxqVDKgyQai6qj3/KteNlrqDx4W5A=="
},
"@hapi/hoek": { "@hapi/hoek": {
"version": "8.5.1", "version": "9.3.0",
"resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.5.1.tgz", "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.3.0.tgz",
"integrity": "sha512-yN7kbciD87WzLGc5539Tn0sApjyiGHAJgKvG9W8C7O+6c7qmoQMfVs0W4bX17eqz6C78QJqqFrtgdK5EWf6Qow==" "integrity": "sha512-/c6rf4UJlmHlC9b5BaNvzAcFv7HZ2QHaV0D4/HNlBdvFnvQq8RI4kYdhyPCl7Xj+oWvTWQ8ujhqS53LIgAe6KQ=="
}, },
"@hapi/iron": { "@hapi/iron": {
"version": "6.0.0", "version": "6.0.0",
@ -51907,38 +51682,9 @@
"version": "2.1.0", "version": "2.1.0",
"resolved": "https://registry.npmjs.org/@hapi/bourne/-/bourne-2.1.0.tgz", "resolved": "https://registry.npmjs.org/@hapi/bourne/-/bourne-2.1.0.tgz",
"integrity": "sha512-i1BpaNDVLJdRBEKeJWkVO6tYX6DMFBuwMhSuWqLsY4ufeTKGVuV5rBsUhxPayXqnnWHgXUAmWK16H/ykO5Wj4Q==" "integrity": "sha512-i1BpaNDVLJdRBEKeJWkVO6tYX6DMFBuwMhSuWqLsY4ufeTKGVuV5rBsUhxPayXqnnWHgXUAmWK16H/ykO5Wj4Q=="
},
"@hapi/hoek": {
"version": "9.3.0",
"resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.3.0.tgz",
"integrity": "sha512-/c6rf4UJlmHlC9b5BaNvzAcFv7HZ2QHaV0D4/HNlBdvFnvQq8RI4kYdhyPCl7Xj+oWvTWQ8ujhqS53LIgAe6KQ=="
} }
} }
}, },
"@hapi/joi": {
"version": "17.1.1",
"resolved": "https://registry.npmjs.org/@hapi/joi/-/joi-17.1.1.tgz",
"integrity": "sha512-p4DKeZAoeZW4g3u7ZeRo+vCDuSDgSvtsB/NpfjXEHTUjSeINAi/RrVOWiVQ1isaoLzMvFEhe8n5065mQq1AdQg==",
"requires": {
"@hapi/address": "^4.0.1",
"@hapi/formula": "^2.0.0",
"@hapi/hoek": "^9.0.0",
"@hapi/pinpoint": "^2.0.0",
"@hapi/topo": "^5.0.0"
},
"dependencies": {
"@hapi/hoek": {
"version": "9.2.1",
"resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.2.1.tgz",
"integrity": "sha512-gfta+H8aziZsm8pZa0vj04KO6biEiisppNgA1kbJvFrrWu9Vm7eaUEy76DIxsuTaWvti5fkJVhllWc6ZTE+Mdw=="
}
}
},
"@hapi/pinpoint": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/@hapi/pinpoint/-/pinpoint-2.0.0.tgz",
"integrity": "sha512-vzXR5MY7n4XeIvLpfl3HtE3coZYO4raKXW766R6DZw/6aLqR26iuZ109K7a0NtF2Db0jxqh7xz2AxkUwpUFybw=="
},
"@hapi/podium": { "@hapi/podium": {
"version": "4.1.3", "version": "4.1.3",
"resolved": "https://registry.npmjs.org/@hapi/podium/-/podium-4.1.3.tgz", "resolved": "https://registry.npmjs.org/@hapi/podium/-/podium-4.1.3.tgz",
@ -51947,13 +51693,6 @@
"@hapi/hoek": "9.x.x", "@hapi/hoek": "9.x.x",
"@hapi/teamwork": "5.x.x", "@hapi/teamwork": "5.x.x",
"@hapi/validate": "1.x.x" "@hapi/validate": "1.x.x"
},
"dependencies": {
"@hapi/hoek": {
"version": "9.3.0",
"resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.3.0.tgz",
"integrity": "sha512-/c6rf4UJlmHlC9b5BaNvzAcFv7HZ2QHaV0D4/HNlBdvFnvQq8RI4kYdhyPCl7Xj+oWvTWQ8ujhqS53LIgAe6KQ=="
}
} }
}, },
"@hapi/teamwork": { "@hapi/teamwork": {
@ -51967,13 +51706,6 @@
"integrity": "sha512-foQZKJig7Ob0BMAYBfcJk8d77QtOe7Wo4ox7ff1lQYoNNAb6jwcY1ncdoy2e9wQZzvNy7ODZCYJkK8kzmcAnAg==", "integrity": "sha512-foQZKJig7Ob0BMAYBfcJk8d77QtOe7Wo4ox7ff1lQYoNNAb6jwcY1ncdoy2e9wQZzvNy7ODZCYJkK8kzmcAnAg==",
"requires": { "requires": {
"@hapi/hoek": "^9.0.0" "@hapi/hoek": "^9.0.0"
},
"dependencies": {
"@hapi/hoek": {
"version": "9.2.1",
"resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.2.1.tgz",
"integrity": "sha512-gfta+H8aziZsm8pZa0vj04KO6biEiisppNgA1kbJvFrrWu9Vm7eaUEy76DIxsuTaWvti5fkJVhllWc6ZTE+Mdw=="
}
} }
}, },
"@hapi/validate": { "@hapi/validate": {
@ -51983,13 +51715,6 @@
"requires": { "requires": {
"@hapi/hoek": "^9.0.0", "@hapi/hoek": "^9.0.0",
"@hapi/topo": "^5.0.0" "@hapi/topo": "^5.0.0"
},
"dependencies": {
"@hapi/hoek": {
"version": "9.3.0",
"resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.3.0.tgz",
"integrity": "sha512-/c6rf4UJlmHlC9b5BaNvzAcFv7HZ2QHaV0D4/HNlBdvFnvQq8RI4kYdhyPCl7Xj+oWvTWQ8ujhqS53LIgAe6KQ=="
}
} }
}, },
"@hapi/wreck": { "@hapi/wreck": {
@ -53800,13 +53525,13 @@
"body-parser": "^1.19.0", "body-parser": "^1.19.0",
"bull": "^3.18.0", "bull": "^3.18.0",
"camelcase-keys": "^4.2.0", "camelcase-keys": "^4.2.0",
"celebrate": "^12.1.1", "celebrate": "^15.0.3",
"chai": "^4.3.6", "chai": "^4.3.6",
"chai-as-promised": "^7.1.1", "chai-as-promised": "^7.1.1",
"csv": "^5.4.0", "csv": "^5.4.0",
"east": "^2.0.3", "east": "^2.0.3",
"express": "^4.18.2", "express": "^4.18.2",
"joi": "^17.2.1", "joi": "^17.12.0",
"json2csv": "^4.5.4", "json2csv": "^4.5.4",
"lodash": "^4.17.21", "lodash": "^4.17.21",
"minimist": "^1.2.7", "minimist": "^1.2.7",
@ -54113,7 +53838,7 @@
"body-parser": "^1.19.0", "body-parser": "^1.19.0",
"bson": "^1.1.4", "bson": "^1.1.4",
"bunyan": "^1.8.15", "bunyan": "^1.8.15",
"celebrate": "^13.0.4", "celebrate": "^15.0.3",
"chai": "^4.3.6", "chai": "^4.3.6",
"chai-as-promised": "^7.1.1", "chai-as-promised": "^7.1.1",
"express": "^4.18.2", "express": "^4.18.2",
@ -54129,16 +53854,6 @@
"typescript": "^5.0.4" "typescript": "^5.0.4"
}, },
"dependencies": { "dependencies": {
"celebrate": {
"version": "13.0.4",
"resolved": "https://registry.npmjs.org/celebrate/-/celebrate-13.0.4.tgz",
"integrity": "sha512-gUtAjEtFyY9PvuuQJq1uyuF46gLetVZzyUKXBDBqqvgzCjTSfwXP8L+WcGt1NrLQvUxXdlzhFolW2Bt9DDEV+g==",
"requires": {
"escape-html": "1.0.3",
"joi": "17.x.x",
"lodash": "4.17.x"
}
},
"diff": { "diff": {
"version": "4.0.2", "version": "4.0.2",
"resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz",
@ -54747,7 +54462,7 @@
"body-parser": "^1.19.0", "body-parser": "^1.19.0",
"bunyan": "^1.8.15", "bunyan": "^1.8.15",
"byline": "^4.2.1", "byline": "^4.2.1",
"celebrate": "^10.1.0", "celebrate": "^15.0.3",
"chai": "^4.3.6", "chai": "^4.3.6",
"chai-as-promised": "^7.1.1", "chai-as-promised": "^7.1.1",
"cli": "^1.0.1", "cli": "^1.0.1",
@ -54771,40 +54486,6 @@
"typescript": "^5.0.4" "typescript": "^5.0.4"
}, },
"dependencies": { "dependencies": {
"@hapi/address": {
"version": "2.1.4",
"resolved": "https://registry.npmjs.org/@hapi/address/-/address-2.1.4.tgz",
"integrity": "sha512-QD1PhQk+s31P1ixsX0H0Suoupp3VMXzIVMSwobR3F3MSUO2YCV0B7xqLcUw/Bh8yuvd3LhpyqLQWTNcRmp6IdQ=="
},
"@hapi/joi": {
"version": "15.1.1",
"resolved": "https://registry.npmjs.org/@hapi/joi/-/joi-15.1.1.tgz",
"integrity": "sha512-entf8ZMOK8sc+8YfeOlM8pCfg3b5+WZIKBfUaaJT8UsjAAPjartzxIYm3TIbjvA4u+u++KbcXD38k682nVHDAQ==",
"requires": {
"@hapi/address": "2.x.x",
"@hapi/bourne": "1.x.x",
"@hapi/hoek": "8.x.x",
"@hapi/topo": "3.x.x"
}
},
"@hapi/topo": {
"version": "3.1.6",
"resolved": "https://registry.npmjs.org/@hapi/topo/-/topo-3.1.6.tgz",
"integrity": "sha512-tAag0jEcjwH+P2quUfipd7liWCNX2F8NvYjQp2wtInsZxnMlypdw0FtAOLxtvvkO+GSRRbmNi8m/5y42PQJYCQ==",
"requires": {
"@hapi/hoek": "^8.3.0"
}
},
"celebrate": {
"version": "10.1.0",
"resolved": "https://registry.npmjs.org/celebrate/-/celebrate-10.1.0.tgz",
"integrity": "sha512-Ybkb+/mek6nl4HZljFGUtma8r1Dq0ClYiHf5RVV3msoDFRsJlAFIR8J6+dKwL4EhgihIPFdBOMc6KFO9izMA9g==",
"requires": {
"@hapi/joi": "15.x.x",
"escape-html": "1.0.3",
"lodash.get": "4.4.x"
}
},
"debug": { "debug": {
"version": "4.3.4", "version": "4.3.4",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
@ -54926,7 +54607,6 @@
"@overleaf/real-time": { "@overleaf/real-time": {
"version": "file:services/real-time", "version": "file:services/real-time",
"requires": { "requires": {
"@hapi/joi": "^17.1.1",
"@overleaf/logger": "*", "@overleaf/logger": "*",
"@overleaf/metrics": "*", "@overleaf/metrics": "*",
"@overleaf/o-error": "*", "@overleaf/o-error": "*",
@ -54943,6 +54623,7 @@
"cookie-signature": "^1.1.0", "cookie-signature": "^1.1.0",
"express": "^4.18.2", "express": "^4.18.2",
"express-session": "^1.17.1", "express-session": "^1.17.1",
"joi": "^17.12.0",
"mocha": "^10.2.0", "mocha": "^10.2.0",
"proxy-addr": "^2.0.7", "proxy-addr": "^2.0.7",
"request": "^2.88.2", "request": "^2.88.2",
@ -55426,7 +55107,7 @@
"bunyan": "^1.8.15", "bunyan": "^1.8.15",
"c8": "^7.2.0", "c8": "^7.2.0",
"cache-flow": "^1.9.0", "cache-flow": "^1.9.0",
"celebrate": "^10.0.1", "celebrate": "^15.0.3",
"chai": "^4.3.6", "chai": "^4.3.6",
"chai-as-promised": "^7.1.1", "chai-as-promised": "^7.1.1",
"chai-exclude": "^2.0.3", "chai-exclude": "^2.0.3",
@ -55483,6 +55164,7 @@
"i18next-fs-backend": "^2.2.0", "i18next-fs-backend": "^2.2.0",
"i18next-http-middleware": "^3.4.1", "i18next-http-middleware": "^3.4.1",
"i18next-scanner": "^4.4.0", "i18next-scanner": "^4.4.0",
"joi": "^17.12.0",
"jose": "^4.3.8", "jose": "^4.3.8",
"jquery": "^2.2.4", "jquery": "^2.2.4",
"jsdom": "^19.0.0", "jsdom": "^19.0.0",
@ -55664,30 +55346,6 @@
"resolved": "https://registry.npmjs.org/@google-cloud/promisify/-/promisify-3.0.1.tgz", "resolved": "https://registry.npmjs.org/@google-cloud/promisify/-/promisify-3.0.1.tgz",
"integrity": "sha512-z1CjRjtQyBOYL+5Qr9DdYIfrdLBe746jRTYfaYU6MeXkqp7UfYs/jX16lFFVzZ7PGEJvqZNqYUEtb1mvDww4pA==" "integrity": "sha512-z1CjRjtQyBOYL+5Qr9DdYIfrdLBe746jRTYfaYU6MeXkqp7UfYs/jX16lFFVzZ7PGEJvqZNqYUEtb1mvDww4pA=="
}, },
"@hapi/address": {
"version": "2.1.4",
"resolved": "https://registry.npmjs.org/@hapi/address/-/address-2.1.4.tgz",
"integrity": "sha512-QD1PhQk+s31P1ixsX0H0Suoupp3VMXzIVMSwobR3F3MSUO2YCV0B7xqLcUw/Bh8yuvd3LhpyqLQWTNcRmp6IdQ=="
},
"@hapi/joi": {
"version": "15.1.1",
"resolved": "https://registry.npmjs.org/@hapi/joi/-/joi-15.1.1.tgz",
"integrity": "sha512-entf8ZMOK8sc+8YfeOlM8pCfg3b5+WZIKBfUaaJT8UsjAAPjartzxIYm3TIbjvA4u+u++KbcXD38k682nVHDAQ==",
"requires": {
"@hapi/address": "2.x.x",
"@hapi/bourne": "1.x.x",
"@hapi/hoek": "8.x.x",
"@hapi/topo": "3.x.x"
}
},
"@hapi/topo": {
"version": "3.1.6",
"resolved": "https://registry.npmjs.org/@hapi/topo/-/topo-3.1.6.tgz",
"integrity": "sha512-tAag0jEcjwH+P2quUfipd7liWCNX2F8NvYjQp2wtInsZxnMlypdw0FtAOLxtvvkO+GSRRbmNi8m/5y42PQJYCQ==",
"requires": {
"@hapi/hoek": "^8.3.0"
}
},
"@opentelemetry/auto-instrumentations-web": { "@opentelemetry/auto-instrumentations-web": {
"version": "0.33.1", "version": "0.33.1",
"resolved": "https://registry.npmjs.org/@opentelemetry/auto-instrumentations-web/-/auto-instrumentations-web-0.33.1.tgz", "resolved": "https://registry.npmjs.org/@opentelemetry/auto-instrumentations-web/-/auto-instrumentations-web-0.33.1.tgz",
@ -56121,16 +55779,6 @@
"streamsearch": "^1.1.0" "streamsearch": "^1.1.0"
} }
}, },
"celebrate": {
"version": "10.1.0",
"resolved": "https://registry.npmjs.org/celebrate/-/celebrate-10.1.0.tgz",
"integrity": "sha512-Ybkb+/mek6nl4HZljFGUtma8r1Dq0ClYiHf5RVV3msoDFRsJlAFIR8J6+dKwL4EhgihIPFdBOMc6KFO9izMA9g==",
"requires": {
"@hapi/joi": "15.x.x",
"escape-html": "1.0.3",
"lodash.get": "4.4.x"
}
},
"chalk": { "chalk": {
"version": "4.1.2", "version": "4.1.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
@ -57525,18 +57173,11 @@
} }
}, },
"@sideway/address": { "@sideway/address": {
"version": "4.1.3", "version": "4.1.4",
"resolved": "https://registry.npmjs.org/@sideway/address/-/address-4.1.3.tgz", "resolved": "https://registry.npmjs.org/@sideway/address/-/address-4.1.4.tgz",
"integrity": "sha512-8ncEUtmnTsMmL7z1YPB47kPUq7LpKWJNFPsRzHiIajGC5uXlWGn+AmkYPcHNl8S4tcEGx+cnORnNYaw2wvL+LQ==", "integrity": "sha512-7vwq+rOHVWjyXxVlR76Agnvhy8I9rpzjosTESvmhNeXOXdZZB15Fl+TI9x1SiHZH5Jv2wTGduSxFDIaq0m3DUw==",
"requires": { "requires": {
"@hapi/hoek": "^9.0.0" "@hapi/hoek": "^9.0.0"
},
"dependencies": {
"@hapi/hoek": {
"version": "9.2.1",
"resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.2.1.tgz",
"integrity": "sha512-gfta+H8aziZsm8pZa0vj04KO6biEiisppNgA1kbJvFrrWu9Vm7eaUEy76DIxsuTaWvti5fkJVhllWc6ZTE+Mdw=="
}
} }
}, },
"@sideway/formula": { "@sideway/formula": {
@ -61677,11 +61318,6 @@
"joi": "^17.3.0" "joi": "^17.3.0"
} }
}, },
"@types/hapi__joi": {
"version": "17.1.8",
"resolved": "https://registry.npmjs.org/@types/hapi__joi/-/hapi__joi-17.1.8.tgz",
"integrity": "sha512-omVytnOAiAfzGUOQArujJr3heWxPrDHW7MF1ieqix1ngoGdhtJmSSDFVM+ZAOa7UmhlGJtltdgUAT03mfDu6kg=="
},
"@types/hapi__mimos": { "@types/hapi__mimos": {
"version": "4.1.4", "version": "4.1.4",
"resolved": "https://registry.npmjs.org/@types/hapi__mimos/-/hapi__mimos-4.1.4.tgz", "resolved": "https://registry.npmjs.org/@types/hapi__mimos/-/hapi__mimos-4.1.4.tgz",
@ -64563,13 +64199,12 @@
} }
}, },
"celebrate": { "celebrate": {
"version": "12.2.0", "version": "15.0.3",
"resolved": "https://registry.npmjs.org/celebrate/-/celebrate-12.2.0.tgz", "resolved": "https://registry.npmjs.org/celebrate/-/celebrate-15.0.3.tgz",
"integrity": "sha512-dkcQaUL4zrPOua/NwTM74jf/NY3wv9Fyb1mkC2ru75KRHowSIDe/tJtIG9yRyPyFCfkr1odif8zNQq23eTwEYg==", "integrity": "sha512-ToF8ILq/F0KhQ0CPtexP7Cu9GkqKJ91VKy3ZOCV24aaNWdm3QCHqnXAKfKHrtcM2B2zmPFe11p8WWsQkmq8k4g==",
"requires": { "requires": {
"@hapi/joi": "17.x.x",
"@types/hapi__joi": "17.x.x",
"escape-html": "1.0.3", "escape-html": "1.0.3",
"joi": "17.x.x",
"lodash": "4.17.x" "lodash": "4.17.x"
} }
}, },
@ -71944,22 +71579,15 @@
"integrity": "sha512-9FzQjJ7MATs1tSpnco1K6ayiYE3figslrXA72G2HQ/n76RzvYlofyi5QM+iX4YRs/pu3yzxlVQSST23+dMDknw==" "integrity": "sha512-9FzQjJ7MATs1tSpnco1K6ayiYE3figslrXA72G2HQ/n76RzvYlofyi5QM+iX4YRs/pu3yzxlVQSST23+dMDknw=="
}, },
"joi": { "joi": {
"version": "17.9.2", "version": "17.12.0",
"resolved": "https://registry.npmjs.org/joi/-/joi-17.9.2.tgz", "resolved": "https://registry.npmjs.org/joi/-/joi-17.12.0.tgz",
"integrity": "sha512-Itk/r+V4Dx0V3c7RLFdRh12IOjySm2/WGPMubBT92cQvRfYZhPM2W0hZlctjj72iES8jsRCwp7S/cRmWBnJ4nw==", "integrity": "sha512-HSLsmSmXz+PV9PYoi3p7cgIbj06WnEBNT28n+bbBNcPZXZFqCzzvGqpTBPujx/Z0nh1+KNQPDrNgdmQ8dq0qYw==",
"requires": { "requires": {
"@hapi/hoek": "^9.0.0", "@hapi/hoek": "^9.3.0",
"@hapi/topo": "^5.0.0", "@hapi/topo": "^5.1.0",
"@sideway/address": "^4.1.3", "@sideway/address": "^4.1.4",
"@sideway/formula": "^3.0.1", "@sideway/formula": "^3.0.1",
"@sideway/pinpoint": "^2.0.0" "@sideway/pinpoint": "^2.0.0"
},
"dependencies": {
"@hapi/hoek": {
"version": "9.2.1",
"resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.2.1.tgz",
"integrity": "sha512-gfta+H8aziZsm8pZa0vj04KO6biEiisppNgA1kbJvFrrWu9Vm7eaUEy76DIxsuTaWvti5fkJVhllWc6ZTE+Mdw=="
}
} }
}, },
"jose": { "jose": {

View file

@ -28,7 +28,7 @@
"body-parser": "^1.19.0", "body-parser": "^1.19.0",
"bson": "^1.1.4", "bson": "^1.1.4",
"bunyan": "^1.8.15", "bunyan": "^1.8.15",
"celebrate": "^13.0.4", "celebrate": "^15.0.3",
"express": "^4.18.2", "express": "^4.18.2",
"lodash": "^4.17.21", "lodash": "^4.17.21",
"mongodb": "^6.2.0", "mongodb": "^6.2.0",

View file

@ -30,7 +30,7 @@
"body-parser": "^1.19.0", "body-parser": "^1.19.0",
"bunyan": "^1.8.15", "bunyan": "^1.8.15",
"byline": "^4.2.1", "byline": "^4.2.1",
"celebrate": "^10.1.0", "celebrate": "^15.0.3",
"cli": "^1.0.1", "cli": "^1.0.1",
"diff-match-patch": "overleaf/diff-match-patch#89805f9c671a77a263fc53461acd62aa7498f688", "diff-match-patch": "overleaf/diff-match-patch#89805f9c671a77a263fc53461acd62aa7498f688",
"esmock": "^2.1.0", "esmock": "^2.1.0",

View file

@ -8,7 +8,7 @@ const WebsocketAddressManager = require('./WebsocketAddressManager')
const bodyParser = require('body-parser') const bodyParser = require('body-parser')
const base64id = require('base64id') const base64id = require('base64id')
const { UnexpectedArgumentsError } = require('./Errors') const { UnexpectedArgumentsError } = require('./Errors')
const Joi = require('@hapi/joi') const Joi = require('joi')
const HOSTNAME = require('os').hostname() const HOSTNAME = require('os').hostname()

View file

@ -17,7 +17,6 @@
"types:check": "tsc --noEmit" "types:check": "tsc --noEmit"
}, },
"dependencies": { "dependencies": {
"@hapi/joi": "^17.1.1",
"@overleaf/logger": "*", "@overleaf/logger": "*",
"@overleaf/metrics": "*", "@overleaf/metrics": "*",
"@overleaf/o-error": "*", "@overleaf/o-error": "*",
@ -31,6 +30,7 @@
"cookie-parser": "^1.4.5", "cookie-parser": "^1.4.5",
"express": "^4.18.2", "express": "^4.18.2",
"express-session": "^1.17.1", "express-session": "^1.17.1",
"joi": "^17.12.0",
"proxy-addr": "^2.0.7", "proxy-addr": "^2.0.7",
"request": "^2.88.2", "request": "^2.88.2",
"socket.io": "github:overleaf/socket.io#0.9.19-overleaf-10", "socket.io": "github:overleaf/socket.io#0.9.19-overleaf-10",

View file

@ -2,20 +2,22 @@ const { Joi: CelebrateJoi, celebrate, errors } = require('celebrate')
const { ObjectId } = require('mongodb') const { ObjectId } = require('mongodb')
const objectIdValidator = { const objectIdValidator = {
name: 'objectId', type: 'objectId',
language: { base: CelebrateJoi.any(),
invalid: 'needs to be a valid ObjectId', messages: {
'objectId.invalid': 'needs to be a valid ObjectId',
}, },
pre(value, state, options) { coerce(value) {
return {
value: typeof value === typeof ObjectId ? value : new ObjectId(value),
}
},
prepare(value, helpers) {
if (!ObjectId.isValid(value)) { if (!ObjectId.isValid(value)) {
return this.createError('objectId.invalid', { value }, state, options) return {
errors: helpers.error('objectId.invalid'),
} }
if (options.convert) {
return new ObjectId(value)
} }
return value
}, },
} }

View file

@ -93,7 +93,7 @@
"bull": "^3.18.0", "bull": "^3.18.0",
"bunyan": "^1.8.15", "bunyan": "^1.8.15",
"cache-flow": "^1.9.0", "cache-flow": "^1.9.0",
"celebrate": "^10.0.1", "celebrate": "^15.0.3",
"connect-redis": "^6.1.3", "connect-redis": "^6.1.3",
"content-disposition": "^0.5.0", "content-disposition": "^0.5.0",
"contentful": "^6.1.1", "contentful": "^6.1.1",
@ -117,6 +117,7 @@
"i18next": "^23.5.1", "i18next": "^23.5.1",
"i18next-fs-backend": "^2.2.0", "i18next-fs-backend": "^2.2.0",
"i18next-http-middleware": "^3.4.1", "i18next-http-middleware": "^3.4.1",
"joi": "^17.12.0",
"jose": "^4.3.8", "jose": "^4.3.8",
"json2csv": "^4.3.3", "json2csv": "^4.3.3",
"jsonwebtoken": "^9.0.0", "jsonwebtoken": "^9.0.0",

View file

@ -0,0 +1,47 @@
const { Joi } = require('../../../../app/src/infrastructure/Validation')
const { ObjectId } = require('mongodb')
const { expect } = require('chai')
const { ValidationError } = require('joi')
describe('Validation', function () {
const validObjectId = '123456781234567812345678'
const invalidObjectId = '12345678-1234-1234-12345678'
it('accepts valid ObjectId strings', async function () {
const schema = Joi.object({
test: Joi.objectId(),
})
const value = await schema.validateAsync({
test: validObjectId,
})
expect(value.test).to.be.instanceof(ObjectId)
expect(value.test.toHexString()).to.equal(validObjectId)
})
it('rejects invalid ObjectId strings', async function () {
const schema = Joi.object({
test: Joi.objectId(),
})
const promise = schema.validateAsync({
test: invalidObjectId,
})
expect(promise).to.be.rejectedWith(ValidationError)
})
it('accepts valid ObjectId objects', async function () {
const schema = Joi.object({
test: Joi.objectId(),
})
const value = await schema.validateAsync({
test: new ObjectId(validObjectId),
})
expect(value.test).to.be.instanceof(ObjectId)
expect(value.test.toHexString()).to.equal(validObjectId)
})
})