John McLear
d5acbb31ae
fix: filter already-deleted sessions when deleting a group ( #7435 )
...
* fix: filter already-deleted sessions when deleting a group
deleteSession uses setSub(..., undefined) to remove session references
from group2sessions and author2sessions, but this can leave null entries
in the sessionIDs object. When deleteGroup later iterates Object.keys
of sessionIDs and calls deleteSession on each, it throws "sessionID
does not exist" for the already-deleted sessions.
Now deleteGroup filters out null/falsy session entries before attempting
to delete them.
Fixes: https://github.com/ether/etherpad-lite/issues/5798
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* test: add regression test for deleteGroup after deleteSession (#5798 )
Creates a group, author, and session, then deletes the session first,
then deletes the group. Without the fix, deleteGroup would throw
"sessionID does not exist" when encountering the null session entry.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 07:13:46 +01:00
SamTV12345
8588d99f12
chore: migrated settings to esm6 ( #7062 )
...
* chore: migrated settings to esm6
* chore: fixed frontends
* chore: fixed missing usage of specialpages
* chore: fixed last errors for settings
* chore: fixed favicon test
2025-08-04 22:42:50 +02:00
SamTV12345
920308a627
chore: moved first files to esm ( #7061 )
...
* chore: moved first files to esm
* chore: moved first files to esm
* chore: fix read only manager
2025-08-04 19:59:28 +02:00
SamTV12345
ed3976afaa
chore: use express session upstream
2025-08-01 22:33:22 +02:00
SamTV12345
c180f55261
chore: use express session upstream
2025-08-01 22:33:22 +02:00
SamTV12345
4ff00e278a
Moved path_exists and promises to es6
2024-08-18 19:52:21 +02:00
SamTV12345
28e04bdf71
Feat/changeset ts ( #6594 )
...
* Migrated changeset
* Added more tests.
* Fixed test scopes
2024-08-18 12:14:24 +02:00
SamTV12345
7e3ad03e2f
Moved to ts ( #6593 )
...
* Moved to ts
* Fixed type check
* Removed js suffixes
* Migrated to ts
* Fixed ts.
* Fixed type check
* Installed missing d ts
2024-08-17 20:14:36 +02:00
SamTV12345
8a1a03eca1
Fixed ueberdb2 build. ( #6533 )
2024-07-22 21:28:52 +02:00
SamTV12345
94985923a7
Removed comments in settings test. ( #6431 )
...
* Removed comments in settings test.
* Fixed admin tests.
2024-06-05 21:36:05 +02:00
reallylowest
ed1c5dd184
chore: remove repetitive words ( #6290 )
...
Signed-off-by: reallylowest <sunjinping@outlook.com>
2024-04-01 16:47:51 +02:00
SamTV12345
db46ffb63b
Feat/admin react ( #6211 )
...
* Added vite react admin ui.
* Added react i18next.
* Added pads manager.
* Fixed docker build.
* Fixed windows build.
* Fixed installOnWindows script.
* Install only if path exists.
2024-03-09 23:07:09 +01:00
SamTV12345
d34b964cc2
Fixed frontend tests. ( #6210 )
...
* Fixed frontend tests.
* Use old socket io syntax.
* uSE ESM:
* Remove padvar.
* Remove cypress.
2024-03-08 18:50:29 +01:00
SamTV12345
295a2a758b
Added backend in typescript. ( #6185 )
2024-02-23 19:48:55 +01:00
SamTV12345
4bd27a1c79
Moved more classes to ts. ( #6179 )
2024-02-22 11:36:43 +01:00
SamTV12345
ead3c0ea38
Added typescript to etherpad
...
* Fixed determining file extension.
* Added ts-node
* Fixed backend tests.
* Fixed frontend test runs.
* Fixed tests.
* Use script approach for starting etherpad.
* Change directory to src.
* Fixed env.
* Change directory
* Fixed build arg.
* Fixed docker build.
* Fixed.
* Fixed cypress file path.
* Fixed.
* Use latest node container.
* Fixed windows workflow.
* Use tsx and optimized docker image.
* Added workflow for type checks.
* Fixed.
* Added tsconfig.
* Converted more files to typescript.
* Removed commented keys.
* Typed caching middleware.
* Added script for checking the types.
* Moved SecretRotator to typescript.
* Fixed npm installation and moved to types folder.
* Use better scripts for watching typescript changes.
* Update windows.yml
* Fixed order of npm installation.
* Converted i18n.
* Added more types.
* Added more types.
* Fixed import.
* Fixed tests.
* Fixed tests.
* Fixed type checking test.
* Fixed stats
* Added express types.
* fixed.
2024-02-05 21:13:02 +01:00
SamTV12345
ff1b929eb2
Added jsdoc for the node part of etherpad. ( #5983 )
2023-10-17 12:49:56 +02:00
webzwo0i
4cf1be966d
fix appendRevision ( #5805 )
...
* test cov
* Added test for checking if a new pad can be created and deleted.
---------
Co-authored-by: SamTV12345 <40429738+samtv12345@users.noreply.github.com>
2023-07-29 18:38:52 +02:00
DanielHabenicht
675c0130b9
allow option to make pad names case-insensitive ( #5501 ) by @DanielHabenicht
...
* New option to make pad names case-insensitive
fixes #3844
* fix helper.gotoTimeslider()
* fix helper.aNewPad() return value
* Update src/node/utils/Settings.js
Co-authored-by: Richard Hansen <rhansen@rhansen.org>
* remove timeout
* rename enforceLowerCasePadIds to lowerCasePadIds
* use before and after hooks
* update with socket specific test
* enforce sanitizing padID for websocket connections
- only enforce for newly created pads, to combat case-sensitive pad name hijacking
* Added updated package.json file.
---------
Co-authored-by: Richard Hansen <rhansen@rhansen.org>
Co-authored-by: SamTV12345 <40429738+samtv12345@users.noreply.github.com>
2023-07-03 20:52:49 +02:00
John McLear
1e98033632
Security: Fix revision parsing ( #5772 )
...
A carefully crated URL can cause Etherpad to hang.
2023-06-26 18:17:06 +01:00
Richard Hansen
b82ccb76df
Merge branch 'master' into develop
2022-05-05 18:53:03 -04:00
Richard Hansen
10206d9e25
DB: Clean up database initialization
2022-05-05 05:18:53 -04:00
Richard Hansen
088bb12797
Pad: Parallelize record fetching when checking consistency
2022-04-16 00:03:07 -04:00
Richard Hansen
096379e6f9
Pad: Limit DB concurrency when copying a pad
2022-04-16 00:03:00 -04:00
Richard Hansen
8442e002f9
Pad: Use the Stream library to improve readability
2022-04-15 23:52:16 -04:00
Richard Hansen
cad2440e6a
Pad: Improve check failure message prefixing
2022-04-15 23:52:16 -04:00
Richard Hansen
2dbda3fe7e
Pad: Check nullness before checking Number.isInteger()
...
This makes it easier to troubleshoot if the value is null.
2022-04-15 23:52:16 -04:00
Richard Hansen
01ffa070ee
Pad: Only check getKeyRevisionNumber() at key revisions
...
Checking every revision is more of a unit test than a consistency
check, and limiting checks to key revisions should improve performance
considerably.
2022-04-15 23:52:16 -04:00
Richard Hansen
fa0d77c11d
Pad: Factor out key rev atext fetch
2022-04-15 23:52:16 -04:00
Richard Hansen
7ee2141fe6
Pad: Simplify getInternalRevisionAText
2022-04-15 23:52:16 -04:00
Richard Hansen
ff494563d9
Pad: Call padCreate, padUpdate hooks asynchronously
2022-04-15 23:52:16 -04:00
Richard Hansen
2ca740c1db
Pad: Improve readability of appendRevision()
2022-04-15 19:14:59 -04:00
Richard Hansen
0d52f985bd
Pad: Reuse getKeyRevisionNumber when testing if key rev
2022-04-15 19:14:59 -04:00
Richard Hansen
79e7697c1c
Pad: Simplify serialization/deserialization
2022-04-15 19:14:59 -04:00
Richard Hansen
addc019810
Pad: Use ES6 class syntax to improve readability
2022-04-15 19:14:59 -04:00
Richard Hansen
38b2ffe899
lint: Avoid snake case
2022-04-15 19:14:59 -04:00
Richard Hansen
07146591dd
Pad: Run padLoad hook asynchronously
2022-04-08 22:04:00 -04:00
Richard Hansen
b38d66b30b
Pad: Move padLoad hook to Pad.init()
2022-04-08 22:04:00 -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
59d60480c0
Pad: Expose pad-specific database object
...
This will make it possible for plugins to add/change/delete custom
pad-specific records.
2022-04-08 21:52:11 -04:00
Richard Hansen
ae092edf0c
AuthorManager: New getAuthorId hook
2022-03-16 06:10:28 -04:00
Richard Hansen
6d4085f5f0
SecurityManager: Restrict valid author token values
2022-03-16 06:10:28 -04:00
Richard Hansen
b89ae69202
SecurityManager: Don't prefetch values
...
Prefetching can cause unhandled Promise rejections, and it makes the
code less readable.
2022-03-16 06:10:28 -04:00
Richard Hansen
b733ed9ab0
Pad: Convert line endings in text from padDefaultContent hook
2022-02-24 17:40:04 -05:00
Richard Hansen
2e0e872ae3
Pad: New padDefaultContent hook
2022-02-19 14:55:43 -05:00
Richard Hansen
aa286b7dbd
API: Add optional authorId param to mutation functions
2022-02-19 14:55:42 -05:00
Richard Hansen
3b8549342a
Pad: Plumb author ID through mutation operations
2022-02-19 14:55:42 -05:00