Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/staging' into development
Browse files Browse the repository at this point in the history
  • Loading branch information
daneryl committed Jan 31, 2025
2 parents 062a26f + e7eae8f commit 7aa47b2
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 19 deletions.
7 changes: 3 additions & 4 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,9 @@ updates:
- dependency-name: flowbite-react #Flowbite & flowbite-datepicker upgrade #6993
versions: ['>= 0.10.1']
- dependency-name: Mongoose #Mongoose upgrade #7017
versions: ['>= 8.4.3']
- dependency-name: cookie
- dependency-name: '@socket.io*'
- dependency-name: bootstrap #we have decided to dont update bootstrap #7489
versions: [">= 8.4.3"]
- dependency-name: "@socket.io*"
- dependency-name: bootstrap
- dependency-name: express-prom-bundle
- dependency-name: immutable
- dependency-name: otplib
Expand Down
5 changes: 3 additions & 2 deletions app/api/socketio/setupSockets.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { createClient, RedisClient } from 'redis';
import cookie from 'cookie';
import * as cookie from 'cookie';
import { Server } from 'http';
import { Server as SocketIoServer } from 'socket.io';
import { Application, Request, Response, NextFunction } from 'express';
Expand Down Expand Up @@ -46,9 +46,10 @@ const setupApiSockets = (server: Server, app: Application) => {
//eslint-disable-next-line @typescript-eslint/no-floating-promises
socket.join(socket.request.headers.tenant || config.defaultTenant.name);
const socketCookie = cookie.parse(socket.request.headers.cookie || '');

if (socketCookie) {
//eslint-disable-next-line @typescript-eslint/no-floating-promises
socket.join(socketCookie['connect.sid']);
socket.join(socketCookie['connect.sid'] || 'default-session-id');
}
});

Expand Down
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "uwazi",
"version": "1.198.0-rc3",
"version": "1.198.0-rc4",
"description": "Uwazi is a free, open-source solution for organising, analysing and publishing your documents.",
"keywords": [
"react"
Expand Down Expand Up @@ -132,7 +132,7 @@
"clean-insights-sdk": "^2.6.2",
"compression": "^1.7.5",
"connect-mongo": "5.1.0",
"cookie": "0.7.0",
"cookie": "1.0.2",
"cookie-parser": "1.4.7",
"cors": "^2.8.5",
"crypto-js": "^4.2.0",
Expand Down Expand Up @@ -286,7 +286,6 @@
"@types/body-parser": "^1.19.5",
"@types/cheerio": "^0.22.30",
"@types/child-process-promise": "^2.2.1",
"@types/cookie": "^0.6.0",
"@types/enzyme": "3.10.12",
"@types/enzyme-adapter-react-16": "1.0.2",
"@types/expect-puppeteer": "4.4.7",
Expand Down
15 changes: 5 additions & 10 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4251,11 +4251,6 @@
resolved "https://registry.yarnpkg.com/@types/cookie/-/cookie-0.4.1.tgz#bfd02c1f2224567676c1545199f87c3a861d878d"
integrity sha512-XW/Aa8APYr6jSVVA1y/DEIZX0/GMKLEVekNG727R8cs56ahETkRAy/3DR7+fJyh7oUgGwNQaRfXCun0+KbWY7Q==

"@types/cookie@^0.6.0":
version "0.6.0"
resolved "https://registry.yarnpkg.com/@types/cookie/-/cookie-0.6.0.tgz#eac397f28bf1d6ae0ae081363eca2f425bedf0d5"
integrity sha512-4Kh9a6B2bQciAhf7FSuMRRkUWecJgJu9nPnx3yzpsfXX/c50REIqpHY4C82bXP90qrLtXtkDxTZosYO3UpOwlA==

"@types/cookiejar@^2.1.5":
version "2.1.5"
resolved "https://registry.yarnpkg.com/@types/cookiejar/-/cookiejar-2.1.5.tgz#14a3e83fa641beb169a2dd8422d91c3c345a9a78"
Expand Down Expand Up @@ -6853,11 +6848,6 @@ [email protected]:
resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.7.tgz#ab5dd7ab757c54e60f37ef6550f481c426d10454"
integrity sha512-NXdYc3dLr47pBkpUCHtKSwIOQXLVn8dZEuywboCOJY/osA0wFSLlSawr3KN8qXJEyX66FcONTH8EIlVuK0yyFA==

[email protected]:
version "0.7.0"
resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.7.0.tgz#2148f68a77245d5c2c0005d264bc3e08cfa0655d"
integrity sha512-qCf+V4dtlNhSRXGAZatc1TasyFO6GjohcOul807YOb5ik3+kQSnb4d7iajeCL8QHaJ4uZEjCgiCJerKXwdRVlQ==

[email protected]:
version "0.7.1"
resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.7.1.tgz#2f73c42142d5d5cf71310a74fc4ae61670e5dbc9"
Expand All @@ -6868,6 +6858,11 @@ [email protected]:
resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.7.2.tgz#556369c472a2ba910f2979891b526b3436237ed7"
integrity sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==

[email protected]:
version "1.0.2"
resolved "https://registry.yarnpkg.com/cookie/-/cookie-1.0.2.tgz#27360701532116bd3f1f9416929d176afe1e4610"
integrity sha512-9Kr/j4O16ISv8zBBhJoi4bXOYNTkFLOqSL3UDB0njXxCXNezjeyVrJyGOWtgfs/q2km1gwBcfH8q1yEGoMYunA==

cookie@~0.4.1:
version "0.4.2"
resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.2.tgz#0e41f24de5ecf317947c82fc789e06a884824432"
Expand Down

0 comments on commit 7aa47b2

Please sign in to comment.