Richard Hansen
692749d1cf
express-session: Extend session lifetime if user is active
2022-01-17 21:45:56 -05:00
Richard Hansen
99fae2ec6e
pad: Fix application of padOptions
values from settings.json
2021-12-04 23:06:17 -05:00
Richard Hansen
f8b4189bc4
pad: Always pass strings to pad option callbacks
2021-12-04 23:06:17 -05:00
Richard Hansen
7ff71cd41e
pad: Ignore null
values in padOptions
from settings.json
2021-12-04 23:06:16 -05:00
Richard Hansen
f4257a28ba
pad: Delete duplicate decodeURIComponent()
calls
...
`URL.searchParams` already decodes the value.
Also delete some useless comments.
2021-12-04 23:06:09 -05:00
Richard Hansen
56cb08f4c5
pad: Pass color and display name in CLIENT_READY
2021-11-05 18:14:27 -04:00
Richard Hansen
7a0d8cb52e
pad: Use URLSearchParams to process search params
...
Also unexport `getUrlVars` because it isn't used outside the file.
2021-11-05 18:14:27 -04:00
Richard Hansen
c8e0916e1a
tests: Spy on socket.io messages as early as possible
2021-11-01 01:54:28 -04:00
Richard Hansen
d36a37d666
PadMessageHandler: Delete unnecessary protocolVersion
...
We can assume that the client code is always in sync with what the
server expects.
2021-10-30 03:06:57 -04:00
Richard Hansen
80e84636d7
pad: Promisify handshake()
2021-10-29 19:38:28 -04:00
Richard Hansen
cd4f5ff281
pad: Defer message handling until handshake completes
2021-10-29 19:37:28 -04:00
Richard Hansen
be0298290d
pad: Move post-handshake code to _afterHandshake()
2021-10-29 19:27:33 -04:00
Richard Hansen
9fb754ce3a
pad: Initialize pad cookie before starting the handshake
2021-10-29 19:27:33 -04:00
Richard Hansen
f6c5ce606e
pad: Move UI setup from handshake()
to init()
2021-10-29 19:27:33 -04:00
Richard Hansen
bd44a87388
pad: Unexport unnecessarily exported handshake()
function
2021-10-29 19:27:33 -04:00
Richard Hansen
5cbbcbcee6
pad: Simplify reload after .etherpad
import
...
The old "switch to pad" logic looked buggy, and it complicates pad
initialization. Forcing a refresh after importing an `.etherpad` file
isn't much of a UX downgrade.
2021-10-29 19:27:33 -04:00
Richard Hansen
e974622561
pad: Use window.
to avoid ESLint error
2021-10-29 19:27:33 -04:00
Richard Hansen
0d65dc8a44
pad: Add clientVars
to postAceInit
hook context
...
This allows plugins to avoid the `clientVars` global variable.
2021-08-25 14:59:17 -04:00
Richard Hansen
8d869ec927
Pad: Delete non-functional debug logging facility
2021-07-30 03:50:23 -04:00
Xavier Mehrenberger
ca4cc2d7c0
Fix settings.useMonospaceFontGlobal
...
When settings.useMonospaceFontGlobal is set to `true`, it sets the default
font to 'monospace'. This font seems to have been removed in
a5164dad43
.
This commit sets the default font to "RobotoMono" which is a valid
option.
Tested in a Docker environment, setting `PAD_OPTIONS_USE_MONOSPACE_FONT`
to `true`
Signed-off-by: Xavier Mehrenberger <xavier.mehrenberger@gmail.com>
2021-07-14 04:33:38 -04:00
John McLear
2b98b930d7
scaling: include padId in socketio query string
2021-03-24 16:07:11 +00:00
Richard Hansen
e2bfe2fd10
pad_editor: Promisify init()
2021-03-20 01:07:16 +00:00
John McLear
1b8cd0747d
Move vendor libraries to /vendors folder and exclude from LGTM
2021-02-21 15:07:39 +00:00
Richard Hansen
8a221ca773
pad: Delete dead code
2021-02-14 08:35:38 +00:00
Richard Hansen
2301c6ec83
pad: Don't throw on socket.io error
2021-02-11 17:25:09 +00:00
freddii
ea202e41f6
docs: fixed typos
2021-02-03 00:30:07 +01:00
John McLear
3a19254f21
stale code: removed excanvas which was ie support for no canvas
2021-01-26 04:05:54 -05:00
Richard Hansen
9f7d42185d
socket.io: Reconnect if the server disconnects
...
This will make the pages gracefully handle HTTP server restart events,
which happen whenever a plugin is installed or uninstalled via the
`/admin/plugins` page.
2020-12-23 16:18:28 -05:00
Richard Hansen
303964c51e
socket.io: Factor out client connection logic
2020-12-23 16:18:28 -05:00
Richard Hansen
7eb0f996c3
socket.io: Delete ignored resource
option
...
I couldn't find any reference to a `resource` option in either the
socket.io-client documentation or its source code.
2020-12-23 16:18:28 -05:00
John McLear
0362d3b05d
lint: pad prefix files ( #4577 )
...
* lint: pad_connectionstatus
* lint: pad_utils
* lint: pad_userlist.js -- still WIP
* shift underscore not to be in require but to be used from window
* lint: pad_modals
* pad_impexp.js
* lint: more errors done
* lint: auto reconn
* lint: pad_editor
* lint: finish auto reconn
* lint: imp exp rework
* lint: import
* lint: pad.js nearly done but pizza here...
* lint: clientVars global query
* put clientVars in window
* Revert incorrect lint fixes
* Properly fix guard-for-in lint errors
* Properly fix no-unused-vars error regarding `gritter`
* Refine lint fixes
Co-authored-by: Richard Hansen <rhansen@rhansen.org>
2020-12-20 07:15:58 +00:00
Richard Hansen
b82bf5c726
Drop support for Internet Explorer
2020-12-19 19:13:31 +00:00
Richard Hansen
7e50fc2ab5
Delete dead SERVER_MESSAGE and guest handling code
...
None of this code seems to be reachable. Hopefully no plugins expect
it to exist.
2020-12-18 09:29:28 +00:00
Richard Hansen
750c7cb1cf
pad: Delete unused ip
and userAgent
client vars
2020-11-26 15:00:46 +00:00
Richard Hansen
8e5fd19db2
lint: Run eslint --fix
on src/
2020-11-24 20:06:12 +00:00
Richard Hansen
7df3ded66f
lint: Put opening brace on same line as function
...
Normally I would let `eslint --fix` do this for me, but there's a bug
that causes:
const x = function ()
{
// ...
};
to become:
const x = ()
=> {
// ...
};
which ESLint thinks is a syntax error. (It probably is; I don't know
enough about the automatic semicolon insertion rules to be confident.)
2020-11-24 20:06:12 +00:00
Richard Hansen
a2554fff22
pad: Pop up an error message dialog box upon socket.io error
2020-10-20 10:01:49 +01:00
Richard Hansen
5b887396c3
pad: Check for null collabClient in socket.io event handlers
2020-10-20 10:01:49 +01:00
Richard Hansen
b1acf6143a
pad: Delete do-nothing sendClientReady
wrapper
2020-10-20 10:01:49 +01:00
John McLear
66df0a572f
Security: FEATURE REMOVAL: Remove all plain text password logic and ui ( #4178 )
...
This will be a breaking change for some people.
We removed all internal password control logic. If this affects you, you have two options:
1. Use a plugin for authentication and use session based pad access (recommended).
1. Use a plugin for password setting.
The reasoning for removing this feature is to reduce the overall security footprint of Etherpad. It is unnecessary and cumbersome to keep this feature and with the thousands of available authentication methods available in the world our focus should be on supporting those and allowing more granual access based on their implementations (instead of half assed baking our own).
2020-10-07 13:43:54 +01:00
Richard Hansen
3ab0f30ac8
cookies: Use js-cookie to read and write cookies
...
Rather than reinvent the wheel, use a well-tested library to parse and
write cookies. This should also help prevent XSS vulnerabilities
because the library handles special characters such as semicolon.
2020-10-04 08:57:44 +01:00
Richard Hansen
1e3aa9edff
pad: Revert back to sending CLIENT_READY
on reconnect
...
Commit 0bb8d73ba2
fixed the author ID
that is saved in the socket.io sessioninfo when the client sends a
`CLIENT_READY` with `reconnect` set to true, so it is now safe to undo
the workaround from PR #3868 .
Fixes #4331 .
2020-09-26 18:32:04 +01:00
Richard Hansen
5ac5b65aff
Pad: Disable toolbar and import/export when reconnecting
2020-09-15 20:04:17 +01:00
Richard Hansen
ed3c82e8c3
Use null
, not "null"
, if sessionID
cookie doesn't exist
...
`decodeURIComponent(null)` returns the string `'null'`, which we don't
want.
2020-09-11 22:10:04 +01:00
webzwo0i
d25cd891ae
remove json2, all supported browsers have JSON now ( #4198 )
...
cf. https://developer.mozilla.org/de/docs/Web/JavaScript/Reference/Global_Objects/JSON
2020-07-28 00:52:25 +01:00
webzwo0i
b7dff552f0
cruft: Remove unecessary consolelogs ( #4141 )
2020-06-27 20:12:06 +01:00
John McLear
13bd859f31
Import/export: Fix3032 - importing document botches pad options ( #3769 )
...
Fixes #3032
2020-06-05 19:58:25 +01:00
John McLear
0d51e71578
ux: Better ux for if cookies are disabled or not available.
2020-06-01 20:17:48 +01:00
John McLear
b2a723e57f
editor: Don't allow edits during reconnecting
...
Not the best fix but better than the current status quo.
2020-05-29 12:35:00 +01:00
John McLear
40f36d7eb5
Tests: ShowChat fix ( #4049 )
...
Resolves https://github.com/ether/etherpad-lite/issues/3541
2020-05-28 15:18:13 +01:00