Commit Graph

113 Commits

Author SHA1 Message Date
Richard Hansen 2facf3a0c5 ExportEtherpad: New `importEtherpad`, `exportEtherpad` hooks 2022-05-06 02:54:34 -04:00
Richard Hansen 88c0ab8255 ExportEtherpad: Support custom subkeys 2022-05-05 19:33:21 -04:00
Richard Hansen 78b44daaa8 ExportEtherpad: Fix `exportEtherpadAdditionalContent` hook docs
When exporting, only records like `comments:padId` are supported, not
records like `comments:padId:foo`.
2022-05-05 19:33:21 -04:00
Richard Hansen f9610452cf Pad: New `padCheck` hook 2022-04-08 21:52:11 -04:00
Richard Hansen a2460a9848 Pad: New `padRemove` hook `pad` context property 2022-04-08 21:52:11 -04:00
Richard Hansen 8fe779b58c Pad: New `padCopy` hook `dstPad` context property 2022-04-08 21:52:11 -04:00
Richard Hansen 9cdb69c159 Pad: Rename `originalPad` context property to `srcPad` 2022-04-08 21:52:11 -04:00
Richard Hansen ba536e68f1 docs: Refine `padRemove` server-side hook documentation 2022-04-08 21:52:11 -04:00
Richard Hansen 362b33c518 docs: Refine `padCopy` server-side hook documentation 2022-04-08 21:52:10 -04:00
Richard Hansen ae092edf0c AuthorManager: New `getAuthorId` hook 2022-03-16 06:10:28 -04:00
Richard Hansen 1513932ca1 plugins: Give each plugin a plugin-specific logger object
This makes it possible for plugins to stop assuming that log4js is
available at `ep_etherpad-lite/node_modules/log4js`.
2022-02-21 15:13:57 -05:00
Richard Hansen 2e0e872ae3 Pad: New `padDefaultContent` hook 2022-02-19 14:55:43 -05:00
Richard Hansen aec512d1fa Pad: Rename `author` context properties to `authorId` 2022-02-19 14:55:42 -05:00
Richard Hansen a8c061154e docs: Clean up `padCreate`, `padUpdate` hook docs 2022-02-19 14:25:39 -05:00
Richard Hansen 02a56dc58c PadMessageHandler: Allow `handleMessageSecurity` to grant one-time write access 2021-12-21 17:23:56 -05:00
Richard Hansen 31b025bd9d PadMessageHandler: Pass session info to `handleMessageSecurity` hook 2021-12-21 17:23:56 -05:00
Richard Hansen 8539a66439 docs: Improve `handleMessageSecurity` documentation 2021-12-21 17:23:56 -05:00
Richard Hansen 72f4ae444d express: New `expressPreSession` server-side hook 2021-12-20 20:08:19 -05:00
Richard Hansen c4b25388ae docs: Server-side hook documentation improvements 2021-12-20 20:08:18 -05:00
Richard Hansen 4d457f6296 ImportHandler: Pass `ImportError` to `import` hook 2021-12-10 02:34:13 -05:00
Richard Hansen f00b1ae89b Merge branch 'master' into develop 2021-11-28 23:10:45 -05:00
Richard Hansen 885ff3bcde Pad: Move `padLoad` hook invocation to `PadManager.js`
This puts global state change logic with the rest of the global state
management logic. This also makes it possible to create temporary Pad
objects without triggering plugin actions.
2021-11-28 22:28:55 -05:00
Richard Hansen 89fe40e080 Changeset: Migrate from `OpIter` to `deserializeOps()` 2021-11-23 01:21:49 -05:00
Richard Hansen f1eb7a25a6 Changeset: Migrate to the new attribute API 2021-11-21 04:11:41 -05:00
Richard Hansen cdad5c3325 docs: Improve `getLineHTMLForExport` server-side hook docs 2021-11-21 04:11:41 -05:00
Richard Hansen 085bc8cbb3 plugins: Don't create `.ep_initialized` files
These files cause problems with Docker images and read-only
directories/mounts, and they have dubious value (any install-time
setup should instead be done at startup).
2021-11-13 17:43:33 -05:00
Richard Hansen 87a490d456 docs: `import` hook `fileEnding` has leading period 2021-11-06 01:05:55 -04:00
Richard Hansen fe87e2df87 ImportHandler: Pass the pad ID to the `import` hook
This enables plugins to log the pad ID if desired.
2021-11-05 17:19:54 -04:00
Richard Hansen caf4e9f28c ImportHandler: Use truthiness to signal conversion handled 2021-11-05 17:19:54 -04:00
Richard Hansen edf99dc811 docs: Document the `import` server-side hook 2021-11-05 17:19:54 -04:00
Richard Hansen 26675c5019 chat: New `chatNewMessage` server-side hook 2021-11-01 01:54:29 -04:00
Richard Hansen 9aaf781548 PadMessageHandler: Modernize `userLeave` hook context properties 2021-10-30 03:07:44 -04:00
Richard Hansen a6d060d67b PadMessageHandler: Replace `clientReady` hook with new `userJoin` hook 2021-10-30 03:07:44 -04:00
Richard Hansen fa54dc1053 PadMessageHandler: Run the `clientReady` hook asynchronously 2021-10-30 03:06:57 -04:00
Richard Hansen 5d30e0b1b2 PadMessageHandler: Run the `userLeave` hook asynchronously 2021-10-30 03:06:57 -04:00
Richard Hansen f4f3aa6aae docs: Improve `userLeave` and `clientReady` hook documentation 2021-10-30 03:03:19 -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 f8a9cd4bad docs: Revise `clientVars` documentation 2021-06-18 22:22:56 -04:00
pcworld 3c71e8983b Fix read only pad access with authentication
Before this commit, webaccess.checkAccess saved the authorization in
user.padAuthorizations[padId] with padId being the read-only pad ID,
however later stages, e.g. in PadMessageHandler, use the real pad ID for
access checks. This led to authorization being denied.

This commit fixes it by only storing and comparing the real pad IDs and
not read-only pad IDs.

This fixes test case "authn user readonly pad -> 200, ok" in
src/tests/backend/specs/socketio.js.
2021-04-12 22:51:06 -04:00
Richard Hansen 8c1afc3399 express: New expressCloseServer hook
This will be used by a future commit to close all socket.io
connections during server restart.
2020-12-23 16:18:28 -05:00
John McLear 83e28ec031
docs: correct name for callback function 2020-11-26 10:10:43 +00:00
Richard Hansen 6a8563eeab import/export: Simplify exportEtherpadAdditionalContent processing
Also:
  * Improve parallelization
  * Refine the documentation
2020-11-10 23:02:43 +00:00
Richard Hansen 68a91f5e24 HTML export: Move `padId` to context object property 2020-11-10 07:13:26 +00:00
John McLear 881d8b8d95
pluginfw: Hook to include additional body in HTML exports (#4469)
* hook, needs docs

* docs
2020-11-06 13:48:59 +00:00
John McLear 3fa58efede
pluginfw: Export .etherpad hooks (#4466)
* export support

* proper prefix

* just a basic example, needs working on still

* docs

* comments shouldnt be hard coded
2020-11-06 13:48:25 +00:00
Richard Hansen 91268e14b7 PadMessageHandler: Rename `client` to `socket`
The `client` variable is actually a socket.io Socket object. Rename it
to reduce confusion.
2020-11-02 20:39:08 +00:00
chandi 30b1273853 docs: fix key in padUpdate context 2020-10-26 23:43:09 +00:00
chandi 94cb000e8f
plugins: include more data within padUpdate hook (#4425)
* Including more data at pad update event

* docs: new context fields in padUpdate

Co-authored-by: Pedro Beschorner Marin <pedrobmarin@gmail.com>
2020-10-21 18:04:03 +01:00
Richard Hansen a4927095ae CSP: Disable the indexCustomInlineScripts hook 2020-10-11 20:31:00 +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