From 078095c3e25d39707bdaab7ec066ceed6cb7158b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mathilde=20Gr=C3=BCnig?= <41020854+mthld@users.noreply.github.com> Date: Fri, 24 Nov 2023 11:52:57 +0100 Subject: [PATCH 1/9] reimplement proper service logging after mistake in e80b6c2 --- docs/cryptpad.service | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/cryptpad.service b/docs/cryptpad.service index 28de3485d..472554bc6 100644 --- a/docs/cryptpad.service +++ b/docs/cryptpad.service @@ -10,6 +10,10 @@ Restart=always # Restart service after 10 seconds if node service crashes RestartSec=2 +# Proper logging to journald +StandardOutput=journal +StandardError=journal+console + User=cryptpad Group=cryptpad # modify to match your working directory From 85977dda7f8975ea258329556364bf18d26bceb3 Mon Sep 17 00:00:00 2001 From: Mathilde <41020854+mthld@users.noreply.github.com> Date: Wed, 29 Nov 2023 11:30:06 +0100 Subject: [PATCH 2/9] Create SECURITY.md --- SECURITY.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 SECURITY.md diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 000000000..133723221 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,19 @@ +# Security Policy + +## Supported Versions + +Considering the amount of resources necessary to backport security or bug fixes to previous, unsupported CryptPad versions, it's not something we do. +However, we quickly release new minor versions in case of need. + +Please keep up with the latest release published here: https://github.com/cryptpad/cryptpad/releases + +Note that every GitHub release page has an RSS compatible feed that you can subscribe on to be informed of every new release. + +We do also communicate about this topic on: +- [Our blog](https://blog.cryptpad.org) +- [Our Matrix public space](https://matrix.to/#/#cryptpad:matrix.xwiki.com) +- [Our Mastodon account](https://fosstodon.org/@cryptpad) + +## Reporting a Vulnerability + +Vulnerabilities can be reported using the GitHub Security interface. You can also send us an email at security@cryptpad.org From 0f7cc0f8a7751e9726f8b2c258a68c2a70679e3a Mon Sep 17 00:00:00 2001 From: nisbet-hubbard <87453615+nisbet-hubbard@users.noreply.github.com> Date: Wed, 6 Dec 2023 15:24:32 +0800 Subject: [PATCH 3/9] Create example.httpd.conf --- docs/example.httpd.conf | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 docs/example.httpd.conf diff --git a/docs/example.httpd.conf b/docs/example.httpd.conf new file mode 100644 index 000000000..3776a72ed --- /dev/null +++ b/docs/example.httpd.conf @@ -0,0 +1,35 @@ +# This file is included strictly as an example of how Apache httpd can be +# configured to work with CryptPad. If you are using CryptPad in production +# and require professional support please contact sales@cryptpad.fr + +# This configuration requires mod_ssl, mod_socache_shmcb, mod_proxy, +# mod_proxy_http and mod_headers + +Listen 443 + +SSLCipherSuite ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384 +SSLProxyCipherSuite ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384 +SSLHonorCipherOrder off +SSLProtocol all -SSLv3 -TLSv1 -TLSv1.1 +SSLProxyProtocol all -SSLv3 -TLSv1 -TLSv1.1 +SSLSessionCache "shmcb:/usr/local/apache/logs/ssl_scache(512000)" +SSLSessionCacheTimeout 86400 +SSLSessionTickets off +SSLUseStapling on +SSLStaplingCache "shmcb:logs/ssl_stapling(32768)" + + + ServerName cryptpad.your-domain.com + ServerAlias sandbox.your-domain.com + Header always set Strict-Transport-Security "max-age=63072000; includeSubDomains" + SSLEngine on + SSLCertificateFile /etc/letsencrypt/live/your-domain.com/cert.pem + SSLCertificateKeyFile /etc/letsencrypt/live/your-domain.com/privkey.pem + BrowserMatch "MSIE [2-5]" \ + nokeepalive ssl-unclean-shutdown \ + downgrade-1.0 force-response-1.0 + Protocols h2 http/1.1 + LimitRequestBody 157286400 + ProxyPass / http://localhost:3000/ upgrade=websocket + ProxyPassReverse / http://localhost:3000/ + From 3ea05fddb7d85f1a5f07a56434b78a7a85ec1808 Mon Sep 17 00:00:00 2001 From: nisbet-hubbard <87453615+nisbet-hubbard@users.noreply.github.com> Date: Wed, 6 Dec 2023 15:53:18 +0800 Subject: [PATCH 4/9] Edit for consistency --- docs/example.httpd.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/example.httpd.conf b/docs/example.httpd.conf index 3776a72ed..d8b0d8d00 100644 --- a/docs/example.httpd.conf +++ b/docs/example.httpd.conf @@ -12,7 +12,7 @@ SSLProxyCipherSuite ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:EC SSLHonorCipherOrder off SSLProtocol all -SSLv3 -TLSv1 -TLSv1.1 SSLProxyProtocol all -SSLv3 -TLSv1 -TLSv1.1 -SSLSessionCache "shmcb:/usr/local/apache/logs/ssl_scache(512000)" +SSLSessionCache "shmcb:logs/ssl_scache(512000)" SSLSessionCacheTimeout 86400 SSLSessionTickets off SSLUseStapling on From 315adc59d7ef7a8cb632d0b57406747d993fe6bf Mon Sep 17 00:00:00 2001 From: yflory Date: Mon, 18 Dec 2023 14:06:28 +0100 Subject: [PATCH 5/9] Update version number --- customize.dist/pages.js | 2 +- package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/customize.dist/pages.js b/customize.dist/pages.js index da85e72db..fcb63bb11 100644 --- a/customize.dist/pages.js +++ b/customize.dist/pages.js @@ -98,7 +98,7 @@ define([ return h('a', attrs, [icon, text]); }; - Pages.versionString = "5.5.0"; + Pages.versionString = "5.6.0"; var customURLs = Pages.customURLs = {}; (function () { diff --git a/package-lock.json b/package-lock.json index 8b0b3081c..34e3156bd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "cryptpad", - "version": "5.5.0", + "version": "5.6.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "cryptpad", - "version": "5.5.0", + "version": "5.6.0", "license": "AGPL-3.0+", "dependencies": { "@mcrowe/minibloom": "^0.2.0", diff --git a/package.json b/package.json index 3eea3fdbf..0c1cb79e1 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "cryptpad", "description": "realtime collaborative visual editor with zero knowlege server", - "version": "5.5.0", + "version": "5.6.0", "license": "AGPL-3.0+", "repository": { "type": "git", From 30d956b52fc02f9e55c3ceebf281372d26d59d49 Mon Sep 17 00:00:00 2001 From: yflory Date: Mon, 18 Dec 2023 15:47:10 +0100 Subject: [PATCH 6/9] Fix ws proxy issue with :: as httpAddress --- config/config.example.js | 8 ++++---- lib/http-worker.js | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/config/config.example.js b/config/config.example.js index 3e0be47c0..4e4ddd46e 100644 --- a/config/config.example.js +++ b/config/config.example.js @@ -74,12 +74,12 @@ module.exports = { // httpSafeOrigin: "https://some-other-domain.xyz", /* httpAddress specifies the address on which the nodejs server - * should be accessible. By default it will listen on 127.0.0.1 - * (IPv4 localhost on most systems). If you want it to listen on - * all addresses, including IPv6, set this to '::'. + * should be accessible. By default it will listen on localhost + * (IPv4 & IPv6 if enabled). If you want it to listen on + * a specific address, specify it here. e.g '192.168.0.1' * */ - //httpAddress: '::', + //httpAddress: 'localhost', /* httpPort specifies on which port the nodejs server should listen. * By default it will serve content over port 3000, which is suitable diff --git a/lib/http-worker.js b/lib/http-worker.js index 5788b63a5..185ae748e 100644 --- a/lib/http-worker.js +++ b/lib/http-worker.js @@ -194,7 +194,8 @@ app.head(/^\/common\/feedback\.html/, function (req, res, next) { const { createProxyMiddleware } = require("http-proxy-middleware"); -var proxyTarget = new URL('', `ws:${Env.httpAddress}`); +var httpAddress = Env.httpAddress === '::' ? 'localhost' : Env.httpAddress; +var proxyTarget = new URL('', `ws:${httpAddress}`); proxyTarget.port = Env.websocketPort; const wsProxy = createProxyMiddleware({ From 4c81c95a949e75b5896077e51fcb6ffe86e201b3 Mon Sep 17 00:00:00 2001 From: yflory Date: Mon, 18 Dec 2023 15:53:43 +0100 Subject: [PATCH 7/9] Remove missing SSO config log --- lib/load-config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/load-config.js b/lib/load-config.js index 6fc7534ec..2ba9771d0 100644 --- a/lib/load-config.js +++ b/lib/load-config.js @@ -50,7 +50,7 @@ config.sso = {}; try { config.sso = require("../config/sso"); } catch (e) { - console.log("SSO config not found"); + //console.log("SSO config not found"); } module.exports = config; From 32c22a8b61526bbb2eccb204be8e4b2c04639c7f Mon Sep 17 00:00:00 2001 From: Wolfgang Ginolas Date: Tue, 19 Dec 2023 08:37:52 +0100 Subject: [PATCH 8/9] Fix race condition on OnlyOffice https://github.com/cryptpad/cryptpad/issues/1319 --- www/common/onlyoffice/v7/sdkjs/cell/sdk-all-min.js | 2 +- www/common/onlyoffice/v7/sdkjs/slide/sdk-all-min.js | 2 +- www/common/onlyoffice/v7/sdkjs/word/sdk-all-min.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/www/common/onlyoffice/v7/sdkjs/cell/sdk-all-min.js b/www/common/onlyoffice/v7/sdkjs/cell/sdk-all-min.js index 8d90f4b49..b9f4cf98a 100644 --- a/www/common/onlyoffice/v7/sdkjs/cell/sdk-all-min.js +++ b/www/common/onlyoffice/v7/sdkjs/cell/sdk-all-min.js @@ -424,7 +424,7 @@ opt_isIdle){this._isViewer=isViewer;if(this._locks){this.ownedLockBlocks=[];for( "indexUser":this._indexUser},"editorType":this.editorType,"lastOtherSaveTime":this.lastOtherSaveTime,"block":this.ownedLockBlocks,"sessionId":this._id,"sessionTimeConnect":this._sessionTimeConnect,"sessionTimeIdle":opt_isIdle>=0?opt_isIdle:0,"documentFormatSave":this._documentFormatSave,"view":this._isViewer,"isCloseCoAuthoring":this.isCloseCoAuthoring,"openCmd":opt_openCmd,"lang":this.lang,"mode":this.mode,"permissions":this.permissions,"encrypted":this.encrypted,"IsAnonymousUser":this.IsAnonymousUser, "timezoneOffset":(new Date).getTimezoneOffset(),"coEditingMode":this.coEditingMode,"jwtOpen":this.jwtOpen,"jwtSession":this.jwtSession,"time":Math.round(performance.now()),"supportAuthChangesAck":true})};DocsCoApi.prototype._initSocksJs=function(){var t=this;var socketio;socketio=this.socketio={};var send=function(data){setTimeout(function(){socketio.onmessage({data:JSON.stringify(data)})})};var license={type:"license",license:{type:3,mode:0,rights:1,buildVersion:"7.3.3",buildNumber:8}};var channel; require(["/common/outer/worker-channel.js","/common/common-util.js"],function(Channel,Util){var msgEv=Util.mkEvent();var p=window.parent;if(editor&&editor.isReporterMode){p=window.opener;window.parent=p}else window.APP=p&&p.APP;window.addEventListener("message",function(msg){if(msg.source!==p)return;msgEv.fire(msg)});var postMsg=function(data){p.postMessage(data,"*")};Channel.create(msgEv,postMsg,function(chan){channel=chan;send(license);chan.on("CMD",function(obj){send(obj)})})});socketio.onopen= -function(){t._onServerOpen()};socketio.onopen();socketio.close=function(){console.error("Close realtime")};socketio.emit=function(type,data){if(channel)channel.event("CMD",data)};socketio.onmessage=function(e){t._onServerMessage(JSON.parse(e.data))};return socketio};DocsCoApi.prototype._onServerOpen=function(){this._state=ConnectionState.WaitAuth;this.onFirstConnect()};DocsCoApi.prototype._onServerMessage=function(data){var dataObject=data;switch(dataObject["type"]){case "auth":this._onAuth(dataObject); +function(){t._onServerOpen()};socketio.onopen();socketio.close=function(){console.error("Close realtime")};socketio.emit=function(type,data){if(channel)channel.event("CMD",structuredClone(data))};socketio.onmessage=function(e){t._onServerMessage(JSON.parse(e.data))};return socketio};DocsCoApi.prototype._onServerOpen=function(){this._state=ConnectionState.WaitAuth;this.onFirstConnect()};DocsCoApi.prototype._onServerMessage=function(data){var dataObject=data;switch(dataObject["type"]){case "auth":this._onAuth(dataObject); break;case "message":this._onMessages(dataObject,false);break;case "cursor":this._onCursor(dataObject);break;case "meta":this._onMeta(dataObject);break;case "getLock":this._onGetLock(dataObject);break;case "releaseLock":this._onReleaseLock(dataObject);break;case "connectState":this._onConnectionStateChanged(dataObject);break;case "saveChanges":this._onSaveChanges(dataObject);break;case "authChanges":this._onAuthChanges(dataObject);break;case "saveLock":this._onSaveLock(dataObject);break;case "unSaveLock":this._onUnSaveLock(dataObject); break;case "savePartChanges":this._onSavePartChanges(dataObject);break;case "drop":this._onDrop(dataObject);break;case "disconnectReason":this._onDisconnectReason(dataObject);break;case "waitAuth":break;case "error":this._onDrop(dataObject);break;case "documentOpen":this._documentOpen(dataObject);break;case "warning":this._onWarning(dataObject);break;case "license":this._onLicense(dataObject);break;case "session":this._onSession(dataObject);break;case "refreshToken":this._onRefreshToken(dataObject["messages"]); break;case "expiredToken":this._onExpiredToken(dataObject);break;case "forceSaveStart":this._onForceSaveStart(dataObject["messages"]);break;case "forceSave":this._onForceSave(dataObject["messages"]);break;case "rpc":this._onPRC(dataObject["responseKey"],false,dataObject["data"]);break}};DocsCoApi.prototype._onServerClose=function(explicit){if(ConnectionState.SaveChanges===this._state){this._isReSaveAfterAuth=true;if(null!==this.saveCallbackErrorTimeOutId){clearTimeout(this.saveCallbackErrorTimeOutId); diff --git a/www/common/onlyoffice/v7/sdkjs/slide/sdk-all-min.js b/www/common/onlyoffice/v7/sdkjs/slide/sdk-all-min.js index 333b64b81..6d9158cb6 100644 --- a/www/common/onlyoffice/v7/sdkjs/slide/sdk-all-min.js +++ b/www/common/onlyoffice/v7/sdkjs/slide/sdk-all-min.js @@ -424,7 +424,7 @@ opt_isIdle){this._isViewer=isViewer;if(this._locks){this.ownedLockBlocks=[];for( "indexUser":this._indexUser},"editorType":this.editorType,"lastOtherSaveTime":this.lastOtherSaveTime,"block":this.ownedLockBlocks,"sessionId":this._id,"sessionTimeConnect":this._sessionTimeConnect,"sessionTimeIdle":opt_isIdle>=0?opt_isIdle:0,"documentFormatSave":this._documentFormatSave,"view":this._isViewer,"isCloseCoAuthoring":this.isCloseCoAuthoring,"openCmd":opt_openCmd,"lang":this.lang,"mode":this.mode,"permissions":this.permissions,"encrypted":this.encrypted,"IsAnonymousUser":this.IsAnonymousUser, "timezoneOffset":(new Date).getTimezoneOffset(),"coEditingMode":this.coEditingMode,"jwtOpen":this.jwtOpen,"jwtSession":this.jwtSession,"time":Math.round(performance.now()),"supportAuthChangesAck":true})};DocsCoApi.prototype._initSocksJs=function(){var t=this;var socketio;socketio=this.socketio={};var send=function(data){setTimeout(function(){socketio.onmessage({data:JSON.stringify(data)})})};var license={type:"license",license:{type:3,mode:0,rights:1,buildVersion:"7.3.3",buildNumber:8}};var channel; require(["/common/outer/worker-channel.js","/common/common-util.js"],function(Channel,Util){var msgEv=Util.mkEvent();var p=window.parent;if(editor&&editor.isReporterMode){p=window.opener;window.parent=p}else window.APP=p&&p.APP;window.addEventListener("message",function(msg){if(msg.source!==p)return;msgEv.fire(msg)});var postMsg=function(data){p.postMessage(data,"*")};Channel.create(msgEv,postMsg,function(chan){channel=chan;send(license);chan.on("CMD",function(obj){send(obj)})})});socketio.onopen= -function(){t._onServerOpen()};socketio.onopen();socketio.close=function(){console.error("Close realtime")};socketio.emit=function(type,data){if(channel)channel.event("CMD",data)};socketio.onmessage=function(e){t._onServerMessage(JSON.parse(e.data))};return socketio};DocsCoApi.prototype._onServerOpen=function(){this._state=ConnectionState.WaitAuth;this.onFirstConnect()};DocsCoApi.prototype._onServerMessage=function(data){var dataObject=data;switch(dataObject["type"]){case "auth":this._onAuth(dataObject); +function(){t._onServerOpen()};socketio.onopen();socketio.close=function(){console.error("Close realtime")};socketio.emit=function(type,data){if(channel)channel.event("CMD",structuredClone(data))};socketio.onmessage=function(e){t._onServerMessage(JSON.parse(e.data))};return socketio};DocsCoApi.prototype._onServerOpen=function(){this._state=ConnectionState.WaitAuth;this.onFirstConnect()};DocsCoApi.prototype._onServerMessage=function(data){var dataObject=data;switch(dataObject["type"]){case "auth":this._onAuth(dataObject); break;case "message":this._onMessages(dataObject,false);break;case "cursor":this._onCursor(dataObject);break;case "meta":this._onMeta(dataObject);break;case "getLock":this._onGetLock(dataObject);break;case "releaseLock":this._onReleaseLock(dataObject);break;case "connectState":this._onConnectionStateChanged(dataObject);break;case "saveChanges":this._onSaveChanges(dataObject);break;case "authChanges":this._onAuthChanges(dataObject);break;case "saveLock":this._onSaveLock(dataObject);break;case "unSaveLock":this._onUnSaveLock(dataObject); break;case "savePartChanges":this._onSavePartChanges(dataObject);break;case "drop":this._onDrop(dataObject);break;case "disconnectReason":this._onDisconnectReason(dataObject);break;case "waitAuth":break;case "error":this._onDrop(dataObject);break;case "documentOpen":this._documentOpen(dataObject);break;case "warning":this._onWarning(dataObject);break;case "license":this._onLicense(dataObject);break;case "session":this._onSession(dataObject);break;case "refreshToken":this._onRefreshToken(dataObject["messages"]); break;case "expiredToken":this._onExpiredToken(dataObject);break;case "forceSaveStart":this._onForceSaveStart(dataObject["messages"]);break;case "forceSave":this._onForceSave(dataObject["messages"]);break;case "rpc":this._onPRC(dataObject["responseKey"],false,dataObject["data"]);break}};DocsCoApi.prototype._onServerClose=function(explicit){if(ConnectionState.SaveChanges===this._state){this._isReSaveAfterAuth=true;if(null!==this.saveCallbackErrorTimeOutId){clearTimeout(this.saveCallbackErrorTimeOutId); diff --git a/www/common/onlyoffice/v7/sdkjs/word/sdk-all-min.js b/www/common/onlyoffice/v7/sdkjs/word/sdk-all-min.js index bd6421759..de3af8b0a 100644 --- a/www/common/onlyoffice/v7/sdkjs/word/sdk-all-min.js +++ b/www/common/onlyoffice/v7/sdkjs/word/sdk-all-min.js @@ -424,7 +424,7 @@ opt_isIdle){this._isViewer=isViewer;if(this._locks){this.ownedLockBlocks=[];for( "indexUser":this._indexUser},"editorType":this.editorType,"lastOtherSaveTime":this.lastOtherSaveTime,"block":this.ownedLockBlocks,"sessionId":this._id,"sessionTimeConnect":this._sessionTimeConnect,"sessionTimeIdle":opt_isIdle>=0?opt_isIdle:0,"documentFormatSave":this._documentFormatSave,"view":this._isViewer,"isCloseCoAuthoring":this.isCloseCoAuthoring,"openCmd":opt_openCmd,"lang":this.lang,"mode":this.mode,"permissions":this.permissions,"encrypted":this.encrypted,"IsAnonymousUser":this.IsAnonymousUser, "timezoneOffset":(new Date).getTimezoneOffset(),"coEditingMode":this.coEditingMode,"jwtOpen":this.jwtOpen,"jwtSession":this.jwtSession,"time":Math.round(performance.now()),"supportAuthChangesAck":true})};DocsCoApi.prototype._initSocksJs=function(){var t=this;var socketio;socketio=this.socketio={};var send=function(data){setTimeout(function(){socketio.onmessage({data:JSON.stringify(data)})})};var license={type:"license",license:{type:3,mode:0,rights:1,buildVersion:"7.3.3",buildNumber:8}};var channel; require(["/common/outer/worker-channel.js","/common/common-util.js"],function(Channel,Util){var msgEv=Util.mkEvent();var p=window.parent;if(editor&&editor.isReporterMode){p=window.opener;window.parent=p}else window.APP=p&&p.APP;window.addEventListener("message",function(msg){if(msg.source!==p)return;msgEv.fire(msg)});var postMsg=function(data){p.postMessage(data,"*")};Channel.create(msgEv,postMsg,function(chan){channel=chan;send(license);chan.on("CMD",function(obj){send(obj)})})});socketio.onopen= -function(){t._onServerOpen()};socketio.onopen();socketio.close=function(){console.error("Close realtime")};socketio.emit=function(type,data){if(channel)channel.event("CMD",data)};socketio.onmessage=function(e){t._onServerMessage(JSON.parse(e.data))};return socketio};DocsCoApi.prototype._onServerOpen=function(){this._state=ConnectionState.WaitAuth;this.onFirstConnect()};DocsCoApi.prototype._onServerMessage=function(data){var dataObject=data;switch(dataObject["type"]){case "auth":this._onAuth(dataObject); +function(){t._onServerOpen()};socketio.onopen();socketio.close=function(){console.error("Close realtime")};socketio.emit=function(type,data){if(channel)channel.event("CMD",structuredClone(data))};socketio.onmessage=function(e){t._onServerMessage(JSON.parse(e.data))};return socketio};DocsCoApi.prototype._onServerOpen=function(){this._state=ConnectionState.WaitAuth;this.onFirstConnect()};DocsCoApi.prototype._onServerMessage=function(data){var dataObject=data;switch(dataObject["type"]){case "auth":this._onAuth(dataObject); break;case "message":this._onMessages(dataObject,false);break;case "cursor":this._onCursor(dataObject);break;case "meta":this._onMeta(dataObject);break;case "getLock":this._onGetLock(dataObject);break;case "releaseLock":this._onReleaseLock(dataObject);break;case "connectState":this._onConnectionStateChanged(dataObject);break;case "saveChanges":this._onSaveChanges(dataObject);break;case "authChanges":this._onAuthChanges(dataObject);break;case "saveLock":this._onSaveLock(dataObject);break;case "unSaveLock":this._onUnSaveLock(dataObject); break;case "savePartChanges":this._onSavePartChanges(dataObject);break;case "drop":this._onDrop(dataObject);break;case "disconnectReason":this._onDisconnectReason(dataObject);break;case "waitAuth":break;case "error":this._onDrop(dataObject);break;case "documentOpen":this._documentOpen(dataObject);break;case "warning":this._onWarning(dataObject);break;case "license":this._onLicense(dataObject);break;case "session":this._onSession(dataObject);break;case "refreshToken":this._onRefreshToken(dataObject["messages"]); break;case "expiredToken":this._onExpiredToken(dataObject);break;case "forceSaveStart":this._onForceSaveStart(dataObject["messages"]);break;case "forceSave":this._onForceSave(dataObject["messages"]);break;case "rpc":this._onPRC(dataObject["responseKey"],false,dataObject["data"]);break}};DocsCoApi.prototype._onServerClose=function(explicit){if(ConnectionState.SaveChanges===this._state){this._isReSaveAfterAuth=true;if(null!==this.saveCallbackErrorTimeOutId){clearTimeout(this.saveCallbackErrorTimeOutId); From 06f4b8e59063f5afae2faf9bdd3ce6ff6ce30f0e Mon Sep 17 00:00:00 2001 From: David Benque Date: Tue, 19 Dec 2023 11:38:26 +0000 Subject: [PATCH 9/9] Add licensing information to new files --- SECURITY.md | 6 ++++++ docs/example.httpd.conf | 4 ++++ lib/plugins/README.md | 6 ++++++ 3 files changed, 16 insertions(+) diff --git a/SECURITY.md b/SECURITY.md index 133723221..75100dbf0 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -1,3 +1,9 @@ + + # Security Policy ## Supported Versions diff --git a/docs/example.httpd.conf b/docs/example.httpd.conf index d8b0d8d00..f98b505f2 100644 --- a/docs/example.httpd.conf +++ b/docs/example.httpd.conf @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2023 XWiki CryptPad Team and contributors +# +# SPDX-License-Identifier: AGPL-3.0-or-later + # This file is included strictly as an example of how Apache httpd can be # configured to work with CryptPad. If you are using CryptPad in production # and require professional support please contact sales@cryptpad.fr diff --git a/lib/plugins/README.md b/lib/plugins/README.md index 70e448011..dd2d15af2 100644 --- a/lib/plugins/README.md +++ b/lib/plugins/README.md @@ -1 +1,7 @@ + + # CryptPad's plugins directory