Richard Hansen
3409e3f5e6
remote_runner: Prevent Sauce errors from interrupting other tests
2021-05-03 01:48:08 -04:00
Richard Hansen
68b041c4fb
remote_runner: Use newline instead of backslash n
2021-05-03 01:48:08 -04:00
Richard Hansen
713e57b451
remote_runner: Don't break long lines
...
Breaking lines makes it harder to read and search the test output.
2021-05-03 01:48:08 -04:00
Richard Hansen
7d75e0ef8f
remote_runner: Simplify append()
2021-05-03 01:48:08 -04:00
Richard Hansen
bbb3046a87
remote_runner: Promisify
2021-05-03 01:48:08 -04:00
Richard Hansen
9059a55873
remote_runner: Improve readability of timeout duration
2021-05-03 01:48:08 -04:00
Richard Hansen
c803ec81f1
remote_runner: Handle webdriver errors
2021-05-03 01:48:08 -04:00
Richard Hansen
7f57b17b2e
remote_runner: Use Error objects to convey pass/fail
2021-05-03 01:48:08 -04:00
Richard Hansen
4ec02a9af9
remote_runner: Simplify finished test check
2021-05-03 01:48:08 -04:00
Richard Hansen
b0e367a982
remote_runner: Simplify logging of console text
2021-05-03 01:48:08 -04:00
Richard Hansen
08856fe42e
remote_runner: Move logIndex
updates into printLog()
2021-05-03 01:48:08 -04:00
Richard Hansen
a12c475776
remote_runner: Use an options object to create webdriver object
2021-05-03 01:48:08 -04:00
Richard Hansen
925f789d4c
remote_runner: Simplify logging
2021-05-03 01:48:08 -04:00
Richard Hansen
014e19cf7d
remote_runner: await
each browser test
2021-05-03 01:48:07 -04:00
Richard Hansen
1f3a831cc3
remote_runner: Avoid duplication in task list
2021-05-03 01:48:07 -04:00
Richard Hansen
59be8d5c05
remote_runner: Delete commented-out browsers
...
Also delete useless and incorrect browser comments.
2021-05-03 01:48:07 -04:00
Richard Hansen
a58fa4a2c5
tests: Add tests for SkipList.atOffset()
2021-05-03 01:42:03 -04:00
Richard Hansen
c00031a8d8
skiplist: Use Map.size
to get number of nodes
2021-05-03 01:42:03 -04:00
Richard Hansen
1cdfe9193b
skiplist: Convert _keyToNodeMap
to a Map
object
2021-05-03 01:42:03 -04:00
Richard Hansen
e2eb7327c2
skiplist: Sanity check inserted entries
2021-05-03 01:42:03 -04:00
Richard Hansen
9e2ef6ad5b
skiplist: Move propagateWidthChange()
to Node
class
2021-05-03 01:42:03 -04:00
Richard Hansen
fc103e7f2a
skiplist: Define a new Node
class
2021-05-03 01:42:03 -04:00
Richard Hansen
9fc88f3601
skiplist: Convert point operations into Point
methods
2021-05-03 01:42:03 -04:00
Richard Hansen
3c1be95e07
skiplist: Move point creation to a new Point
class
2021-05-03 01:42:03 -04:00
Richard Hansen
8ae40e80f9
skiplist: Save entry in _insertKeyAtPoint()
2021-05-03 01:42:03 -04:00
Richard Hansen
0e424fa8c3
skiplist: Remove unnecessary newKey
arg from _insertKeyAtPoint()
2021-05-03 01:42:03 -04:00
Richard Hansen
ab8c354f18
skiplist: Use ES6 class syntax
...
This makess it easier to examine state in dev console.
2021-05-03 01:42:03 -04:00
Richard Hansen
303fd297bd
editor: Improve documentation comments
2021-05-03 01:42:03 -04:00
Richard Hansen
cbbcef8e90
AttributeManager: Add sanity checks
2021-05-03 01:42:03 -04:00
Richard Hansen
d40d59d9eb
AttributeManager: Simplify logic
2021-05-03 01:42:03 -04:00
Richard Hansen
e3d32a26b6
skiplist: Delete unused methods
2021-05-03 01:42:03 -04:00
Richard Hansen
f650c3d73e
editor: Delete unused PROFILER
code
2021-05-03 01:42:03 -04:00
Richard Hansen
ab4e99f67a
editor: Delete commented-out code
2021-05-03 01:42:03 -04:00
Richard Hansen
eeead46437
PadMessageHandler: Use a Map
for sessioninfos
...
Maps are a bit more flexible, have clearer semantics, and have a
convenient `size` property.
2021-05-03 01:35:11 -04:00
Richard Hansen
14d4aadfe4
PadMessageHandler: Parallelize client updates
...
Multiple clients are updated in parallel, but multiple revisions sent
to a particular client are still sent sequentially.
2021-05-03 01:35:11 -04:00
Richard Hansen
770755debf
PadMessageHandler: Assume sessioninfo stays valid during client update
...
...but add a try/catch around the message transmission just in case.
2021-05-03 01:35:11 -04:00
Richard Hansen
c85391862b
PadMessageHandler: Avoid unnecessary property lookups
2021-05-03 01:35:11 -04:00
Richard Hansen
d5c6a44d9c
PadMessageHandler: Improve documentation of sessioninfos
2021-05-03 01:35:11 -04:00
Richard Hansen
4c4415e14a
PadMessageHandler: Register activePads
metric only once
2021-05-03 01:35:11 -04:00
snyk-bot
6011d31b22
fix: upgrade underscore from 1.12.1 to 1.13.0
...
Snyk has created this PR to upgrade underscore from 1.12.1 to 1.13.0.
See this package in npm:
https://www.npmjs.com/package/underscore
See this project in Snyk:
https://app.snyk.io/org/johnmclear/project/d9a12bfb-7ccd-443f-9e22-f30d339cc8c5?utm_source=github&utm_medium=upgrade-pr
2021-05-03 01:31:53 -04:00
Richard Hansen
8f236b8687
Minify: Avoid crash due to unhandled Promise rejection if stat fails
2021-05-03 01:26:49 -04:00
Richard Hansen
e8df643d75
Minify: Treat ENOTDIR
like ENOENT
when statting a file
...
This avoids an exception when require-kernel requests a path like
`existing-file.js/index.js`.
2021-05-03 01:26:48 -04:00
Richard Hansen
aaacbd3a7a
Minify: Refactor requestURI()
for readability
2021-05-03 01:26:48 -04:00
translatewiki.net
3a8d66ba6a
Localisation updates from https://translatewiki.net .
2021-04-30 08:49:17 +02:00
translatewiki.net
3afc77dae7
Localisation updates from https://translatewiki.net .
2021-04-26 15:20:55 +02:00
Richard Hansen
8384a7a67b
deps: Bump ueberdb2
2021-04-20 21:56:44 +02:00
Richard Hansen
ea8846154f
favicon: Redo favicon customization
2021-04-20 13:33:55 -04:00
Richard Hansen
92e0bff80c
favicon: Refactor handler and add tests
2021-04-20 13:33:55 -04:00
Richard Hansen
d0d4b95980
favicon: Only serve from /favicon.ico
2021-04-20 13:33:54 -04:00
webzwo0i
3a5af19492
AuthorManager: await for more db methods
2021-04-20 11:27:44 -04:00
webzwo0i
35797e57fc
AuthorManager: await db.set in createAuthor
2021-04-20 11:27:44 -04:00
webzwo0i
20c512c8a9
test for await db.set in createAuthor
2021-04-20 11:27:43 -04:00
Chocobozzz
a001a13411
fix(perf): Disable wtfnode dump by default
...
Consumes a lot of CPU so it's better to enable it on purpose
2021-04-13 16:01:41 +02:00
Richard Hansen
951d369e3f
padaccess: Delete useless try/catch
2021-04-12 22:51:06 -04:00
Richard Hansen
329d037431
Simplify read-only pad ID checks
2021-04-12 22:51:06 -04:00
Richard Hansen
f63610bb12
tests: Test access bypass via read-only pad ID
2021-04-12 22:51:06 -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
pcworld
0d33793908
tests: readonly pastes must be readable+exportable with authentication
...
readonly paste links should be readable even if authentication is turned
on, as long as the user provides valid login data.
This test currently fails.
Also test that readonly paste IDs can be exported under the same
condition, which currently succeeds.
2021-04-12 22:51:06 -04:00
translatewiki.net
7d5cad6932
Localisation updates from https://translatewiki.net .
2021-04-12 15:43:27 +02:00
Richard Hansen
d01b593d3c
chat: Ensure that ctx.text
is interpreted as HTML
2021-04-11 06:20:29 +02:00
Richard Hansen
a3a0ff7bc1
chat: Use jQuery to build the chat message DOM object
...
This reduces the likelihood of accidentally introducing an XSS
vulnerability.
2021-04-11 06:20:29 +02:00
Richard Hansen
74554d36a5
chat: Allow chatNewMessage
hook to modify more values
2021-04-11 06:20:29 +02:00
Richard Hansen
1ad134a538
PadMessageHandler: Improve logging of pre-CLIENT_READY drops
...
This should make it easier to see what is emitting the the messages so
it can be fixed.
2021-04-09 18:43:02 +02:00
Richard Hansen
91e99c84ca
import: Reduce log spam from unsupported elements
2021-04-09 18:43:02 +02:00
Richard Hansen
09c349e2a1
import: Use a Set for supported elements
2021-04-09 18:43:02 +02:00
translatewiki.net
e31da37d00
Localisation updates from https://translatewiki.net .
2021-04-08 14:54:44 +02:00
webzwo0i
a796811558
escape userId before setting it as HTML attribute
2021-04-07 23:29:27 -04:00
webzwo0i
9408d4395f
remove custom timeouts
2021-04-07 17:47:11 -04:00
Mikk Andresen
af19a010c5
DOCS: Fix broken links in TOC - use Marked to generate ID slugs instead of local implementation that was giving out different IDs in some cases - https://github.com/citizenos/citizenos-fe/issues/535
2021-04-06 21:42:01 +02:00
webzwo0i
e483b91916
Don't make browsers fail on sync-xhr until require-kernel is dropped
2021-04-05 04:34:29 -04:00
snyk-bot
e86547c4f5
fix: upgrade openapi-backend from 3.9.0 to 3.9.1
...
Snyk has created this PR to upgrade openapi-backend from 3.9.0 to 3.9.1.
See this package in npm:
https://www.npmjs.com/package/openapi-backend
See this project in Snyk:
https://app.snyk.io/org/johnmclear/project/d9a12bfb-7ccd-443f-9e22-f30d339cc8c5?utm_source=github&utm_medium=upgrade-pr
2021-04-03 16:54:52 -04:00
Richard Hansen
e4754eb9df
tests: Fix race in timeslider_revisions.js
2021-04-02 15:46:27 +02:00
Richard Hansen
27e5373050
tests: Fix race in change_user_name.js
2021-04-02 15:46:27 +02:00
Richard Hansen
58dac4c0fc
tests: Fix races in inner_height.js
2021-04-02 15:46:27 +02:00
Richard Hansen
4ad80d4072
tests: Delete overly aggressive frontend test timeouts
...
This should reduce test flakiness.
2021-04-02 15:46:27 +02:00
Richard Hansen
7cbb3f565d
tests: Speed up helper.edit()
and helper.clearPad()
2021-04-02 15:46:27 +02:00
Richard Hansen
7a154b1e1d
tests: Wait for commit instead of sleep in timeslider_revisions.js
2021-04-02 15:46:27 +02:00
Richard Hansen
d15ff9ce8d
tests: Add missing await
s to change_user_name.js
...
Also increase the timeouts.
2021-04-02 15:46:27 +02:00
Richard Hansen
bbf89dfcf9
tests: Refine frontend tests
...
* Switch from `helper.newPad()` to `helper.aNewPad()`.
* Promisify.
* Delete redundant logic.
* Lint fixes.
2021-04-02 15:46:27 +02:00
Richard Hansen
3790c0e41c
tests: Use async
/await
instead of returning Promises
...
This has a few benefits:
* It's more readable: It's easier for a user of the function to know
that they should use `await` when calling the function.
* Stack traces are more useful.
* Some code (e.g., the async npm package) uses introspection to
determine if a function is `async` vs. takes a callback.
2021-04-02 15:46:27 +02:00
Richard Hansen
b164a34e64
lint: Fix ESLint error in helper/methods.js
2021-04-02 15:46:27 +02:00
Richard Hansen
62403159df
tests: Invert conditions to improve readability
2021-04-02 15:46:27 +02:00
Richard Hansen
dd9c08d821
tests: Wait for commit rather than sleep
2021-04-01 14:31:56 +02:00
Richard Hansen
2776946627
tests: Use cookie libraries to manipulate cookies
2021-04-01 14:31:56 +02:00
Richard Hansen
202d65d2bb
pad_cookie: Re-read prefs cookie on every call to getPref()
...
This makes it easier to write tests that clear the prefs cookie.
2021-04-01 14:31:56 +02:00
Richard Hansen
0df41a9a78
pad_cookie: Move initial cookie read+save to init()
...
Benefits of this change:
* It avoids race conditions with tests that clear cookies.
* Any attempt to get or set a value before `init()` is called will
throw an error, ensuring the API is used properly.
* Improved readability: It's easier to understand what the
`pad.noCookie` check is doing.
2021-04-01 14:31:56 +02:00
Richard Hansen
aeee5c0b69
tests: Fix cookie name in helper.js
tests
2021-04-01 14:31:56 +02:00
Richard Hansen
137fa89d2a
tests: Always set cookie path to / (to match non-test behavior)
2021-04-01 14:31:56 +02:00
Richard Hansen
5666c34061
tests: Fix encoding of prefs cookie
2021-04-01 14:31:56 +02:00
Richard Hansen
63e6e163b7
tests: Promisify some of the helper.js
tests
2021-04-01 14:31:56 +02:00
Richard Hansen
701a40ac13
tests: Promisify multiple_authors_clear_authorship_colors.js
2021-04-01 14:31:56 +02:00
Richard Hansen
8b43f9eb5f
tests: Promisify authorship_of_editions.js
2021-04-01 14:31:56 +02:00
Richard Hansen
056939cd22
tests: Refine helper/multipleUsers.js
...
* Rename "current"/"other" to "user0"/"user1".
* Delete unnecessary `_createTokenFor*` functions.
* Rename helper functions to remove unnecessary leading underscore
and for brevity.
* Use jQuery's `.attr()` to build the second iframe.
* Use js-cookie to manipulate the token cookie.
* Don't attempt to set the token cookie if the pad isn't loaded.
* Use the token generated by the pad.
* Only clear the token cookie at path=/.
2021-04-01 14:31:56 +02:00
Guilherme Goncalves
f2034ad368
tests: Add regression tests for character composition race
...
See: https://github.com/ether/etherpad-lite/issues/4978
2021-03-30 16:42:53 -04:00
Richard Hansen
1fdaf95c3b
collab_client: Delete unused NO_COMMIT_PENDING
handling
2021-03-30 16:42:53 -04:00
Richard Hansen
63a1f078f4
collab_client: Redo server message queueing
...
Move server message queue processing out of `handleUserChanges()` for
the following reasons:
* Fix a race condition: Before this change the client would stop
processing incoming messages and stop sending changes to the
server if a `NEW_CHANGES` message arrived while the user was
composing a character and waiting for an `ACCEPT_COMMIT` message.
* Improve readability: The `handleUserChanges()` function is for
handling changes from the local user, not for handling changes
from other users.
* Simplify the code.
2021-03-30 16:42:53 -04:00
Richard Hansen
e99fe88537
collab_client: Use Date.now()
instead of casting a Date object
...
Also rename the `t` variable to `now` to improve readability.
2021-03-30 16:42:53 -04:00
Richard Hansen
5c445eac21
collab_client: Convert state
var to committing
bool
2021-03-30 16:42:53 -04:00
Richard Hansen
3ee6b5eb2b
collab_client: Delete unused caughtErrors
2021-03-30 16:42:53 -04:00
Richard Hansen
81b9a2544d
collab_client: Factor out duplicate ACCEPT_COMMIT
code
2021-03-30 16:42:53 -04:00
snyk-bot
dd09a3f12b
fix: src/package.json & src/package-lock.json to reduce vulnerabilities
...
The following vulnerabilities are fixed with an upgrade:
- https://snyk.io/vuln/SNYK-JS-UNDERSCORE-1080984
2021-03-30 18:26:32 +02:00
Richard Hansen
b9753dcc71
Changeset: Return a new op object by default when iterating
...
Reusing the same op object for each iteration can result in very weird
behaviors because previously yielded op objects will get a surprise
mutation.
It is unclear why the code was written to reuse the same object. There
was no comment, nor is there a commit message providing rationale (it
has behaved this way since the very first commit). Perhaps the objects
were reused to improve performance (fewer object allocations that need
to be garbage collected). I do expect this change to reduce
performance somewhat, but not enough to warrant reverting this commit.
2021-03-29 18:42:55 -04:00
Richard Hansen
718da6fc1b
tests: New helper.aNewPad()
(promisified newPad()
)
2021-03-29 18:40:05 -04:00
Richard Hansen
ec76a6548f
tests: Make the helper.newPad()
callback optional
2021-03-29 18:40:05 -04:00
Richard Hansen
27b35699ea
tests: Fix helper.newPad()
retries
...
* Pass retry count in options object so that each pad has its own
retry count.
* Delete useless `origPadName` variable.
2021-03-29 18:40:05 -04:00
translatewiki.net
eac5a52690
Localisation updates from https://translatewiki.net .
2021-03-29 17:55:09 +02:00
John McLear
b80f5bdae8
bugfix/tests/scaling: Socket query test fix ( #4974 )
...
fix socketio test where res.req is not available.
2021-03-24 21:03:48 +00:00
John McLear
2b98b930d7
scaling: include padId in socketio query string
2021-03-24 16:07:11 +00:00
webzwo0i
3ae6b01518
bump version
2021-03-22 16:17:18 +01:00
webzwo0i
65b644498f
bump require-kernel dependency
2021-03-21 18:30:39 +00:00
John McLear
a8f9c2b6a7
fix: upgrade express-rate-limit from 5.2.5 to 5.2.6 ( #4938 )
...
Snyk has created this PR to upgrade express-rate-limit from 5.2.5 to 5.2.6.
See this package in npm:
https://www.npmjs.com/package/express-rate-limit
See this project in Snyk:
https://app.snyk.io/org/johnmclear/project/d9a12bfb-7ccd-443f-9e22-f30d339cc8c5?utm_source=github&utm_medium=upgrade-pr
Co-authored-by: snyk-bot <snyk-bot@snyk.io>
2021-03-20 17:45:00 -04:00
Richard Hansen
eb3cff5b3a
LibreOffice: Remove unnecessary callbackification
...
`async.queue` will do the right thing if passed an `async` function.
2021-03-20 20:29:55 +00:00
Richard Hansen
0233399fdf
Abiword: Avoid calling stdoutCallback
multiple times
2021-03-20 20:29:55 +00:00
webzwo0i
c208d50c4a
add version string to iframe_editor.css
2021-03-20 16:42:08 +00:00
webzwo0i
b250ceaae7
add test for wrong clientHeight
2021-03-20 16:41:15 +00:00
Richard Hansen
3ad1d0a74f
cssmanager: Refactor CSS manager creation to avoid race condition
...
Safari takes a while to initialize `document.styleSheets`, which
results in a race condition when loading the pad. Avoid the race
condition by accessing the CSSStyleSheet objects directly from the
HTMLStyleElement DOM objects.
2021-03-20 01:07:16 +00:00
Richard Hansen
e2bfe2fd10
pad_editor: Promisify init()
2021-03-20 01:07:16 +00:00
Richard Hansen
81e36cf3c7
Ace2Inner: Promisify init()
2021-03-20 01:07:16 +00:00
Richard Hansen
742a7cd430
cssmanager: Throw if no matching style sheet is found
...
This avoids a later null dereference when the stack trace isn't as
useful.
2021-03-20 01:07:16 +00:00
Richard Hansen
5b05ee79ff
cssmanager: Simplify iteration over style sheets
2021-03-20 01:07:16 +00:00
Richard Hansen
cb9f6d6776
ace: Use iframe srcdoc
property to refine frame load logic
...
This seems to fix "null is not an object (evaluating
'browserSheet.insertRule')" errors on Safari.
2021-03-19 17:06:58 +01:00
Richard Hansen
b4e1e935e2
LibreOffice: Log conversion errors
2021-03-18 09:02:28 +00:00
Richard Hansen
b2c0837cf5
import/export: Promisify Abiword and LibreOffice conversion
2021-03-18 09:02:28 +00:00
Richard Hansen
b321267e66
LibreOffice: Use the async-provided callback to signal errors
...
This avoids having two callbacks, which improves readability.
2021-03-18 09:02:28 +00:00
Richard Hansen
b914a46a87
LibreOffice: Use async.series
to properly handle conversion errors
2021-03-18 09:02:28 +00:00
Richard Hansen
a6d5611c80
LibreOffice: Use consistent intermediate filename
2021-03-18 09:02:28 +00:00
Richard Hansen
ad0be9d1d2
LibreOffice: Add missing fileExtension
property on intermediate step
2021-03-18 09:02:28 +00:00
Richard Hansen
5eab3a123d
Abiword: Use the async-provided callback to signal errors
...
This avoids having two callbacks, which improves readability.
2021-03-18 09:02:28 +00:00
Richard Hansen
8d32463915
Abiword: Fix logging of conversion failure
2021-03-18 09:02:28 +00:00
Richard Hansen
f015f59cfc
Abiword: Reduce log spam
2021-03-18 09:02:28 +00:00
Richard Hansen
259ee4a987
Abiword: Don't call the callback if null
2021-03-18 09:02:28 +00:00
Richard Hansen
83f39289aa
import/export: On export error return 500 instead of crashing
2021-03-18 09:02:28 +00:00
Richard Hansen
3a11e97758
import/export: Spelling fix: "convertor" -> "converter"
2021-03-18 09:02:28 +00:00
Richard Hansen
50fdadab7d
ExportHandler: Pass the error unmodified
2021-03-18 09:02:28 +00:00
Richard Hansen
216aecd433
import/export: Use Error objects for errors, not strings
2021-03-18 09:02:28 +00:00
Richard Hansen
59c167e31b
ExportHandler: Replace unnecessary exception with return
2021-03-18 09:02:28 +00:00
Richard Hansen
785b7d2b44
Abiword: Reset stdout buffer when starting abiword
2021-03-18 09:02:28 +00:00
Richard Hansen
b6c2586920
import/export: Delete unnecessary comments
2021-03-18 09:02:28 +00:00
Richard Hansen
fe1eceb6b5
tests: Use assert
to simplify import/export tests
2021-03-18 09:02:28 +00:00
Richard Hansen
98c42d6076
tests: Promisify import/export tests
2021-03-18 09:02:28 +00:00
Richard Hansen
ff50682412
tests: Increase import/export test timeouts
2021-03-18 09:02:28 +00:00
translatewiki.net
5c9514f926
Localisation updates from https://translatewiki.net .
2021-03-15 19:03:09 +01:00
Richard Hansen
c5a37d7a92
deps: Bump ueberdb2 to get MySQL improvements
2021-03-13 19:51:43 +00:00
webzwo0i
6f591b5c77
add class pad to timeslider to fix height issue ( #4941 )
2021-03-12 21:16:22 -05:00
webzwo0i
8e2a21ec84
arrow functions dont have arguments ( #4943 )
2021-03-12 14:25:14 -05:00
Richard Hansen
0b9bf4a78e
deps: Update ueberdb2 to get updated metrics
2021-03-11 20:21:38 +00:00
Richard Hansen
9b82d1d37d
server: Log stats (metrics) on fatal error
...
This might help users troubleshoot rare crashes.
2021-03-11 07:38:44 +00:00
Richard Hansen
d2610284ad
bin/safeRun.sh: Fix try: not found
bug
...
This fixes a copy+paste bug introduced in commit
8b28e00784
(v1.8.8).
2021-03-10 02:54:20 -05:00
Richard Hansen
fcf43a7089
stats: Expose ueberDB metrics
2021-03-08 22:32:39 +00:00
Richard Hansen
71dfa7070d
deps: Update ueberdb2 to get metrics
2021-03-08 22:32:39 +00:00
Richard Hansen
926f0fcefb
CSS: Increase size of contenteditable area
2021-03-08 14:39:18 +00:00
Richard Hansen
404486069c
ace: Build the outer and inner iframes programmatically
...
This makes the code easier to read and it silences Chrome's
`document.write()` warning:
https://developers.google.com/web/updates/2016/08/removing-document-write
This is a redo of commit a17f9bf3cf
,
which was reverted in commit 912f0f195f
due to a CSS bug.
2021-03-05 19:31:59 +00:00
webzwo0i
4ca989a255
sessions: add more endpoints that do not need a session ( #4921 )
...
* add more endpoints that do not need a session
* Update src/node/hooks/express/webaccess.js
Co-authored-by: Richard Hansen <rhansen@rhansen.org>
* Update src/node/hooks/express/webaccess.js
Co-authored-by: Richard Hansen <rhansen@rhansen.org>
Co-authored-by: John McLear <john@mclear.co.uk>
Co-authored-by: Richard Hansen <rhansen@rhansen.org>
2021-03-05 07:48:33 +00:00
Richard Hansen
60da2373a6
CSS: Add comment to no-skin/pad.css
to silence warning
...
Firefox prints "Style sheet could not be loaded" if the file is empty.
2021-03-05 07:45:48 +00:00
Richard Hansen
5546cc5e7b
CSS: Delete bogus <link>
tag
...
Browsers report an error with this tag. Strangely, this tag has
existed since Etherpad's very first commit.
2021-03-05 07:45:48 +00:00
Richard Hansen
470f40d7db
CSS: Use auto
for iframe body height
...
This change makes no visual difference right now, but will matter (for
reasons I don't understand) once we change `ace.js` to build the
iframes by constructing elements in JavaScript (vs. writing HTML).
2021-03-05 07:45:48 +00:00
Richard Hansen
48e1d1c23f
CSS: Fix class name for outer iframe <html>
tag
...
* Add the class "pad" to the `<html>` tag in `pad.html` (the outer
iframe's parent).
* Change the CSS selector that refers to the `<html>` tag in
`pad.html` from `html:not(.inner-editor)` to `html.pad`.
* Change the class name of the outer iframe's `<html>` tag from
"inner-editor" to "outer-editor".
* Update CSS rules to use the new class name.
2021-03-05 07:45:48 +00:00
John McLear
de394f72a6
bump version
2021-03-05 07:28:44 +00:00
John McLear
5ac90ab30f
tests: Allow time for minification to complete
...
Minification happens after the initial visit and request to pages.
2021-03-05 07:11:42 +00:00
snyk-bot
d0e257d8df
fix: upgrade resolve from 1.19.0 to 1.20.0
...
Snyk has created this PR to upgrade resolve from 1.19.0 to 1.20.0.
See this package in npm:
https://www.npmjs.com/package/resolve
See this project in Snyk:
https://app.snyk.io/org/johnmclear/project/d9a12bfb-7ccd-443f-9e22-f30d339cc8c5?utm_source=github&utm_medium=upgrade-pr
2021-03-05 06:37:45 +00:00
translatewiki.net
21cdf0edaa
Localisation updates from https://translatewiki.net .
2021-03-04 13:58:49 +01:00
Richard Hansen
912f0f195f
Revert "ace: Build the outer and inner iframes programmatically"
...
This reverts commit a17f9bf3cf
, which
caused a mysterious bug with the line numbers. Revert to avoid
blocking a new release while I figure out the bug.
2021-03-04 02:05:54 +00:00
Richard Hansen
0aad3b74da
pluginfw: Improve rendering of hook list
...
There are two main benefits:
* HTML is no longer printed in the startup debug logs.
* `require()` is no longer called on client-side files. This
eliminates "Failed to load <file> for <plugin>: ReferenceError:
window is not defined" errors when users visit
`/admin/plugins/info`.
2021-03-03 11:19:37 +00:00
Richard Hansen
7e698baa80
pluginfw: Improve hook function load error message
2021-03-03 11:19:37 +00:00
John McLear
f95b09e0b6
Import: Import don't show warnings for supported elements
2021-03-02 17:14:47 +00:00
snyk-bot
2fd06535b7
fix: upgrade express-rate-limit from 5.2.3 to 5.2.5
...
Snyk has created this PR to upgrade express-rate-limit from 5.2.3 to 5.2.5.
See this package in npm:
https://www.npmjs.com/package/express-rate-limit
See this project in Snyk:
https://app.snyk.io/org/johnmclear/project/d9a12bfb-7ccd-443f-9e22-f30d339cc8c5?utm_source=github&utm_medium=upgrade-pr
2021-03-02 06:52:15 +00:00
Richard Hansen
797ffa5600
Minify: Avoid path.relative()
...
Constructing a relative pathname on Windows is problematic because the
two absolute pathnames might be on different drives (or UNC paths).
Use `path.resolve()` instead of `path.join()` where appropriate to
avoid the need to construct a relative path.
2021-03-02 06:20:10 +00:00
Richard Hansen
8971166c58
lint: Set up Cypress config and fix issues
2021-03-02 05:49:48 +00:00
Richard Hansen
b0862cd030
ace: Delete all $$INCLUDE_CSS
logic
...
The intention of the deleted code was to reduce the number of fetches,
but it only saved a single fetch due to implementation flaws. The
right way to reduce the number of fetches is to use a bundling
technology such as webpack, and this change makes it easier to do so.
2021-03-01 14:32:33 +00:00
Richard Hansen
66d3ac3783
ace: Debug logging
2021-03-01 14:32:33 +00:00
Richard Hansen
a17f9bf3cf
ace: Build the outer and inner iframes programmatically
...
This makes the code easier to read and it silences Chrome's
`document.write()` warning:
https://developers.google.com/web/updates/2016/08/removing-document-write
2021-03-01 14:32:33 +00:00
Richard Hansen
c696732838
ace: Asyncify Ace2Editor.init()
2021-03-01 14:32:33 +00:00
Richard Hansen
159fd5bdeb
ace: Simplify passing of editorInfo
2021-03-01 14:32:33 +00:00
Richard Hansen
e57829183d
ace: Pass objects to Ace2Inner via function args
2021-03-01 14:32:33 +00:00
Richard Hansen
6fe0154129
ace: Use absolute URLs when building iframes
...
This isn't strictly necessary right now, but will become
necessary (due to a Safari quirk) when we change to building the
iframes programmatically (vs. the current `document.write()`
approach).
2021-03-01 14:32:33 +00:00
Richard Hansen
9cfc2fb801
ace: Simplify the aceEditorCSS
hook map function
2021-03-01 14:32:33 +00:00
Richard Hansen
94c221586c
ace: Factor out duplicated $$INCLUDE_CSS
code
2021-03-01 14:32:33 +00:00
Richard Hansen
54df7f3728
ace: Delete unused clientVars.disableCustomScriptsAndStyles
2021-03-01 14:32:33 +00:00
Richard Hansen
d84447290e
ace: Delete unnecessary IIFE
2021-03-01 14:32:33 +00:00
Richard Hansen
3a311d2182
ace: Lint and simplify script strings
2021-03-01 14:32:33 +00:00
Richard Hansen
c9b1f17f25
ace: Format script strings for readability
2021-03-01 14:32:33 +00:00
Richard Hansen
b3416c4eeb
ace: Delete ignored class attribute
2021-03-01 14:32:33 +00:00
Richard Hansen
c9c8b27854
ace: Delete unused Ace2Editor.getFrame()
method
2021-03-01 14:32:33 +00:00
John McLear
64e9e7fcda
tests: Frontend test Windows ZIP ( #4894 )
...
* tests: Frontend test Windows ZIP
This PR introduces Frontend testing within Github actions!
We're depending a lot on saucelabs recently and that's fine but sometimes we just want to quickly do a frontend simple test on a weird environment (IE windows build) so this PR solves that problem.
Things to note.
It still builds the windows .zip if the cypress tests fail.
It does not add any heavy deps to Etherpad as cypress must be installed in CI.
Cypress is responsible for running the Etherpad instance.
It's up to us how much we use this or not, I know it introduces a bunch of technical debt but I tried to keep that a minimum by compartmentalizing things and documenting where required.
* Update .github/workflows/windows-zip.yml
Co-authored-by: Richard Hansen <rhansen@rhansen.org>
* remove timeouts
* Move folder structure up a level
* Update windows-zip.yml
* Update test.js
Co-authored-by: Richard Hansen <rhansen@rhansen.org>
2021-03-01 14:31:55 +00:00
John McLear
b3d7f5d63e
pluginTools: stalePlugins.js
...
Outputs a list of pluginnames and email address for maintainers to contact. Useful for me to bump folks to maintain there stuff and stop it getting stale :)
2021-02-28 16:05:53 +00:00
John McLear
35ae08ca77
tests: run a long(1+ hr) load test
2021-02-28 16:05:16 +00:00
John McLear
d7fd3934de
Merge branch 'develop' of github.com:ether/etherpad-lite into develop
2021-02-28 15:51:51 +00:00
John McLear
237bab7e3e
branding: change etherpad lite to etherpad in Pad settings modal
2021-02-28 15:51:39 +00:00
Richard Hansen
99b3918f2c
Minify: Compatibility for all vendors/*.js
files
2021-02-28 11:12:30 +00:00
Richard Hansen
3667f2ca0e
Ace2Inner: Fix missing spread operator on args
...
This fixes a bug that was introduced in commit
c38c34bef4
.
2021-02-28 08:39:47 +00:00
Richard Hansen
16e6496eb4
deps: Update ueberdb2 to fix dirty DB bug
2021-02-28 08:03:20 +00:00
webzwo0i
377883db98
fix pads with spaces ( #4884 )
2021-02-27 22:34:43 -05:00
John McLear
37769cc9ff
bump version
2021-02-27 16:46:22 +00:00
webzwo0i
348d08c79e
ensure version string is attached for inner frame resources
2021-02-27 16:28:12 +00:00
webzwo0i
01dd9f5440
speed up page load
2021-02-27 16:28:12 +00:00
John McLear
ba2004cb2d
nice-select restore to working
...
I accidently committed a breaking change in 1b8cd0747d/src/static/js/vendors/nice-select.js
2021-02-27 16:23:39 +00:00
Richard Hansen
3a34db84e6
tests: Refine CachingMiddleware tests
...
* Lint functions
* Fix assignment of `settings.minify`
* Use a for loop to avoid copied code for the `minify = true` and
`minify = false` cases
* Put each resource fetch into its own test case
* Check for 200 status code
* Use `.expect()` to check header value
* Use `.expect(fn)` instead of `.then(fn)`
2021-02-27 14:03:09 +01:00
Richard Hansen
f86df5322e
CachingMiddleware: Asyncify
2021-02-27 14:03:09 +01:00
Richard Hansen
0284d49522
CachingMiddleware: Switch to ES6 class syntax
2021-02-27 14:03:09 +01:00
Richard Hansen
80af66543a
lint: Move up respond()
in caching_middleware.js
2021-02-27 14:03:09 +01:00
Richard Hansen
7ab3ee2121
lint: src/node/utils/caching_middleware.js
2021-02-27 14:03:09 +01:00
Richard Hansen
392d9dcfde
PadMessageHandler: Fix fetching of socket.io Sockets for a pad
2021-02-27 08:46:49 +00:00
Richard Hansen
9cd67cd990
PadMessageHandler: Delete unnecessary use of Promise.then()
2021-02-27 08:46:49 +00:00
webzwo0i
15dba7d886
move underscore to its old place and remove unnecessary packages ( #4876 )
2021-02-27 00:10:53 -05:00
John McLear
c0ec28f781
reversecompat: underscore
...
Backward compatibility for plugins that were written when underscore lived at src/static/js/underscore.js.
2021-02-26 11:03:19 +00:00
John McLear
11f3b7232d
bump version
2021-02-25 18:26:17 +00:00
webzwo0i
efd211bbc5
remove useless semicolon
2021-02-25 16:59:06 +00:00
webzwo0i
fa29858a4e
avoid manually including require-kernel in ace.js
2021-02-25 16:59:06 +00:00
translatewiki.net
12c23d468c
Localisation updates from https://translatewiki.net .
2021-02-25 16:17:56 +01:00
webzwo0i
a77994ab6e
avoid pad_utils in pad.html
2021-02-25 12:46:04 +00:00
Richard Hansen
ba5d8369bf
Minify: Consistently use path.join()
to build pathnames
...
This defends against extraneous or missing slashes, and it might
improve the experience on Windows.
2021-02-25 10:14:48 +00:00
Richard Hansen
2d3469e3ee
Minify: Improve pathname sanitization
...
For context, see:
https://nvd.nist.gov/vuln/detail/CVE-2015-3297
9d4e5f6e35
https://github.com/ether/etherpad-lite/issues/2614
2021-02-25 10:14:48 +00:00
Richard Hansen
0cce4ae536
Minify: Also serve jquery.js
from old path for compatibility
2021-02-25 10:14:48 +00:00
Richard Hansen
f845f21ba5
/static/tests.html: Fix jquery.js
path
...
See commit 1b8cd0747d
.
2021-02-25 10:14:48 +00:00
John McLear
4a65acf417
docs: fix links from TOC to Headings and improve appearance of docs (a little) ( #4866 )
...
* docs: fix links from TOC to Headings
* docs: Styling
Just a little modernisation of the appearance of the documentation
* Update src/bin/doc/package.json
Co-authored-by: Richard Hansen <rhansen@rhansen.org>
Co-authored-by: Richard Hansen <rhansen@rhansen.org>
2021-02-25 09:01:45 +00:00
Richard Hansen
41ec7fe3fc
deps: Update ueberdb2 to work around dirty DB bug
2021-02-25 00:02:14 +00:00
Richard Hansen
b2ffd8c95c
lint: Update ESLint dependencies
2021-02-24 09:07:24 +00:00
Richard Hansen
dabff9be77
run_cmd: Fix PATH debug log message
2021-02-23 21:41:32 -05:00
John McLear
c7511b2f2e
tests: change timeout on bold and embed_value test to support Win10 FF84
2021-02-23 19:53:03 +00:00
John McLear
72d9c8fef9
tests: Use more modern relevant Firefox version in Sauce Labs
...
Firefox 52 has issues with rendering SVG animations which caused random tests to fail. Less than 2% of total Firefox users now use Firefox 52 so we're safe to drop testing for it.
2021-02-23 19:53:03 +00:00
John McLear
8364546e70
tests: fix importexport tests
...
The testing approach was redone to fix numerous issues:
* Even if the tests had been working, none of them would have caught
https://github.com/ether/etherpad-lite/issues/4808 because they
didn't exercise the client-side import logic. Now they do.
* Follow-up logic was not in the `helper.waitFor()` callback like it
should have been. Now the code uses `async` and `await` to ensure
proper execution order.
* All `$.ajax()` calls used `async: false`. Now they're properly
asynchronous.
* The `helper.waitFor()` condition callbacks threw instead of
returning false.
* The string comparisons didn't allow for different attribute
order (e.g., `<ol start="1" class="list-number1">` vs. `<ol
class="list-number1" start="1">`). Now `Node.isEqualNode()` is
used to reduce fragility. (`Node.isEqualNode()` is not perfect, so
the tests are still a bit fragile: If class names or style strings
are in a different order then `Node.isEqualNode()` will return
false even if the nodes are semantically equivalent.)
Co-authored-by: Richard Hansen <rhansen@rhansen.org>
2021-02-22 18:20:24 -05:00
Richard Hansen
3ca1589885
Revert "tests: fix importexport frontend tests ( #4827 )"
...
I'm going to split this into separate commits.
This reverts commit 9b03f8f6ab
.
2021-02-22 18:19:48 -05:00
translatewiki.net
f246d1b476
Localisation updates from https://translatewiki.net .
2021-02-22 16:37:36 +01:00
John McLear
0ac33d2085
tests: timeslider_follow increase test timeout for firefox.
2021-02-22 14:30:19 +00:00
Richard Hansen
1908bedabe
caretPosition: Clarify comment in getPosition()
2021-02-22 11:25:45 +00:00
Richard Hansen
91955609af
caretPosition: Delete pointless logic in getPosition()
...
The `line` variable is unconditionally overwritten later, and the
function calls do not have side effects, so it is safe to delete this
logic.
2021-02-22 11:25:45 +00:00
Richard Hansen
1dbdaf93d7
caretPosition: Delete no-op Range.detach()
call
2021-02-22 11:25:45 +00:00
Richard Hansen
5e731dfbfd
caretPosition: Delete unused var in getPosition()
2021-02-22 11:25:45 +00:00
Richard Hansen
02fd0048bf
caretPosition: Invert condition in getPosition()
for readability
2021-02-22 11:25:45 +00:00
Richard Hansen
773959ec57
CI: Delete old Sauce Connect logic
2021-02-22 11:25:21 +00:00
John McLear
9b03f8f6ab
tests: fix importexport frontend tests ( #4827 )
...
* CI: Leave log level at INFO for frontend tests
* CI: Disable frontend admin tests for non-admin workflow
* CI: Disable import/export rate limiting for frontend tests
* tests: fix importexport tests
The testing approach was redone to fix numerous issues:
* Even if the tests had been working, none of them would have caught
https://github.com/ether/etherpad-lite/issues/4808 because they
didn't exercise the client-side import logic. Now they do.
* Follow-up logic was not in the `helper.waitFor()` callback like it
should have been. Now the code uses `async` and `await` to ensure
proper execution order.
* All `$.ajax()` calls used `async: false`. Now they're properly
asynchronous.
* The `helper.waitFor()` condition callbacks threw instead of
returning false.
* The string comparisons didn't allow for different attribute
order (e.g., `<ol start="1" class="list-number1">` vs. `<ol
class="list-number1" start="1">`). Now `Node.isEqualNode()` is
used to reduce fragility. (`Node.isEqualNode()` is not perfect, so
the tests are still a bit fragile: If class names or style strings
are in a different order then `Node.isEqualNode()` will return
false even if the nodes are semantically equivalent.)
Co-authored-by: Richard Hansen <rhansen@rhansen.org>
Co-authored-by: Richard Hansen <rhansen@rhansen.org>
2021-02-22 10:40:38 +00:00
Richard Hansen
d9c2778d17
plugins: Better fix for LGTM security warning
2021-02-22 09:43:20 +00:00
John McLear
0f16e518ff
api: drop JSONP ( #4835 )
...
* api: drop JSONP
* docs: drop JSONP
* tests: drop JSONP
* api: remove isValidJSONPName require
2021-02-22 09:10:02 +00:00
Richard Hansen
85231cb774
tests: More descriptive Sauce Labs name
2021-02-22 03:36:12 -05:00
Richard Hansen
6198e92706
tests: Pass --legacy-peer-deps
flag to work around npm v7 bug
...
This flag is unknown to npm v6, but npm v6 silently ignores unknown
flags.
2021-02-22 03:36:12 -05:00
webzwo0i
14a9749b75
tests: add assert helper for supporting node 10.x
2021-02-22 03:36:12 -05:00
John McLear
ce83181ac3
Lgtm bugfixes ( #4838 )
...
* code tidy up: always evaluates
* tidy up: is always true
* tidy up: remove unused code
* always true/false variables
* unused variable
* tidy up: remove unused code in caretPosition.js
* for squash: Revert "tidy up: remove unused code in caretPosition.js"
The `if` condition was previously always true, so the body should be
preserved. If the body is preserved, other logic can be deleted. I
opened PR #4845 to clean it all up.
This reverts commit 75b03e5a7d
.
* for squash: simplify
* for squash: Explain that the getter is used for its side effects
It's very weird to call a getter without using its return value. Add a
comment explaining why this is done so that the reader doesn't get
confused.
* for squash: Revert "tidy up: remove unused code"
The exception test was the purpose of the code.
This reverts commit 85153b1676
.
* for squash: Log the tsort results
Co-authored-by: Richard Hansen <rhansen@rhansen.org>
2021-02-22 08:26:35 +00:00
John McLear
40d7480d5b
lint: padaccess.js
2021-02-21 21:09:02 -05:00
John McLear
029729a386
lint: Settings.js
2021-02-21 21:09:02 -05:00
John McLear
435562299f
lint: NodeVersion.js
2021-02-21 21:09:02 -05:00
John McLear
7352dc7571
lint: ImportEtherpad.js
2021-02-21 21:09:02 -05:00
John McLear
613c7d8545
lint: ExportTxt.js
2021-02-21 21:09:02 -05:00
John McLear
d2359be08b
lint: ExportHtml.js
2021-02-21 21:09:02 -05:00
John McLear
5718c8b360
lint: AbsolutePaths.js
2021-02-21 21:09:02 -05:00
John McLear
b1614f0592
lint: i18n.js
...
Partial, still 3 more to do that are slightly higher hanging that can get done.
2021-02-21 21:09:02 -05:00
John McLear
586af5e16e
lint: padurlsanitize.js
2021-02-21 21:06:38 -05:00
John McLear
86c938cae2
lint: openapi.js
2021-02-21 21:06:38 -05:00
John McLear
25d4faddd9
lint: SocketIORouter.js
2021-02-21 21:06:38 -05:00
John McLear
5201cb717f
lint: PadMessageHandler.js
2021-02-21 21:06:38 -05:00
John McLear
d67f170c46
lint: eejs/index.js
2021-02-21 21:06:38 -05:00
John McLear
3ed4ac649c
lint: PadManager.js
2021-02-21 21:02:59 -05:00
John McLear
6b6201b448
null link on plugins and noopener / noreferrer
...
Resolves a (non) security issue brought up by LGTM but I think the noopener and norefferer are good shouts
2021-02-21 19:30:39 +00:00
John McLear
2c763fb4d1
Delete dirty-db-cleaner.py
2021-02-21 18:07:20 +00:00
John McLear
543e94fd4a
timeslider: slight improvement on code quality ( #4836 )
...
This is an interim patch, ultimately the JS needs to be thrown out of the HTML...
2021-02-21 17:59:15 +00:00
John McLear
1b8cd0747d
Move vendor libraries to /vendors folder and exclude from LGTM
2021-02-21 15:07:39 +00:00
webzwo0i
0bb3e65020
fix for caching plugin-definitions
2021-02-21 14:31:15 +00:00
John McLear
086b59b30d
editor: UI polish - Etherpad brand as reconnect & loading animation
2021-02-21 13:24:51 +00:00
John McLear
bb14775820
drop apiRoot object from build
2021-02-21 11:08:07 +00:00
John McLear
227370547d
update openapi-backend
2021-02-21 11:08:07 +00:00
John McLear
ee2b32281c
pluginfw: Warn plugins on missing plugin ( #4826 )
...
* pluginfw: Warn plugins on missing plugin
Add functionality to console.warn when a plugin is missing. This will help admins know when people are trying to use plugins that are missing. Resolves https://github.com/ether/etherpad-lite/issues/4730
* pluginfw: importing .etherpad can notify admins of missing plugins
Extending .etherpad imports to notify admins if a missing plugin is present
* Update ImportEtherpad.js
2021-02-21 11:07:13 +00:00
John McLear
77b2f372ab
lint: pad_userlist.js arrow functions
...
This probably needs a good rewrite/refactor to remove self.
2021-02-21 11:05:25 +00:00
John McLear
2511eed472
lint: Changeset.js more literal conditionals
2021-02-21 11:05:25 +00:00
John McLear
8cbd5222dd
lint: pad_userlist.js - remove require browser
2021-02-21 11:05:25 +00:00
John McLear
73b3a2dc54
lint: AttributeManager.js use ES6 method for hasAttrib
2021-02-21 11:05:25 +00:00
John McLear
f86578ffc3
lint: changesettracker.js var > const/let and other easy fixes
2021-02-21 11:05:25 +00:00
John McLear
3635cb6ca6
lint: changesettracker.js long-lines
2021-02-21 11:05:25 +00:00
John McLear
f5f4e3a6d1
lint: changesettracker.js arrow funcs
2021-02-21 11:05:25 +00:00
John McLear
d4b6cbc897
line: broadcast.js
2021-02-21 11:05:25 +00:00
John McLear
3b5b996d84
lint: Changeset no var
2021-02-21 11:05:25 +00:00
John McLear
0b78ad2f90
lint: Changeset.js curly braces in correct position
2021-02-21 11:05:25 +00:00
John McLear
23d7544763
lint: Changeset.js max-len
2021-02-21 11:05:25 +00:00
John McLear
98a0e76a20
lint: Changeset.js opcode eqeqeq checks
2021-02-21 11:05:25 +00:00
John McLear
d91f2b5b07
lint: Changeset.js additional arrow functions
2021-02-21 11:05:25 +00:00
John McLear
acccf56724
lint: Changeset.js arrow-functions
2021-02-21 11:05:25 +00:00
John McLear
cf37f52093
lint: collab_client.js
2021-02-21 11:05:25 +00:00
John McLear
b029edb931
lint: index.js
2021-02-21 11:05:25 +00:00
John McLear
01dd004054
lint: ChangesetUtils
2021-02-21 11:05:25 +00:00
John McLear
7c51446040
lint: use strict
2021-02-21 11:05:25 +00:00
John McLear
c64b1b8ead
lint: skins
2021-02-21 11:05:25 +00:00
Sebastian Castro
4ca2d7ea3a
include lineHeight property in sidebar elements ( #4831 )
...
This also makes the full line number element clickable to ensure a positive UX for the ``?lineNumber`` URL endpoint. It also makes it more obvious that a click action can happen based on the hover.
Make line numbers stick to baseline of first line of wrapped content and editor lines with increased line hieght.
Make it compatible with ep_author_neat
2021-02-20 13:24:17 +00:00
snyk-bot
d5997ddf05
fix: upgrade log4js from 0.6.35 to 0.6.38
...
Snyk has created this PR to upgrade log4js from 0.6.35 to 0.6.38.
See this package in npm:
https://www.npmjs.com/package/log4js
See this project in Snyk:
https://app.snyk.io/org/johnmclear/project/d9a12bfb-7ccd-443f-9e22-f30d339cc8c5?utm_source=github&utm_medium=upgrade-pr
2021-02-18 21:13:08 +00:00
Richard Hansen
6163339c0d
plugins: Always install plugins with --no-save
...
The npm CLI can get confused if `package.json` or `package-lock.json`
exist.
2021-02-18 19:18:59 +00:00
Richard Hansen
b3b5af3c3c
plugins: Use npm
CLI to install/uninstall plugins
...
Using npm as a module has long been discouraged and will stop working
with npm v7.
2021-02-18 19:18:59 +00:00
Richard Hansen
9633b98f92
tests: Delete unnecessary use of npm
package
2021-02-18 19:18:59 +00:00
Richard Hansen
1cfbf88f7c
run_cmd: Enhance with ability to return stdout as string
2021-02-18 19:18:59 +00:00
Richard Hansen
d8bb5aa009
plugins: Eliminate unnecessary run_npm.js
...
I had anticipated more shared logic than we actually need (the
abstraction in `run_npm.js` is YAGNI).
2021-02-18 19:18:59 +00:00
Richard Hansen
426c025127
run_cmd: Log to Etherpad logs by default
2021-02-18 19:18:59 +00:00
Richard Hansen
689a75b381
plugins: Pass --no-production
instead of setting NODE_ENV=development
2021-02-18 19:18:59 +00:00
Richard Hansen
dcf7891316
plugins: Improve logging of plugin events
...
This will make it easier to troubleshoot plugin and npm issues.
2021-02-18 19:18:59 +00:00
Richard Hansen
4253a2ea8f
plugins: Move hook call and plugin update out of try block
...
Exceptions thrown by these function calls are serious and should crash
Etherpad.
2021-02-18 19:18:59 +00:00
Richard Hansen
a8479e4a0e
lint: Fix some ESLint errors in pluginfw
2021-02-18 19:18:59 +00:00
Richard Hansen
a45e85a730
Use settings.root
to anchor pathnames
2021-02-18 19:18:59 +00:00
Richard Hansen
f868788417
Remove unnecessary path.normalize()
calls
...
`path.join()` already normalizes.
2021-02-18 19:18:59 +00:00
Richard Hansen
84c1d74f8b
server: Fix Gate constructor
...
The ECMAScript spec for `.then()` requires Promise subclass
constructors to take an executor.
2021-02-18 19:18:34 +00:00
Richard Hansen
4c6cb53d18
server: Improve log messages when exiting
2021-02-18 19:18:34 +00:00
snyk-bot
449b03d7e8
fix: upgrade unorm from 1.4.1 to 1.6.0
...
Snyk has created this PR to upgrade unorm from 1.4.1 to 1.6.0.
See this package in npm:
https://www.npmjs.com/package/unorm
See this project in Snyk:
https://app.snyk.io/org/johnmclear/project/d9a12bfb-7ccd-443f-9e22-f30d339cc8c5?utm_source=github&utm_medium=upgrade-pr
2021-02-18 19:18:19 +00:00
John McLear
9fb2c640b9
tests: Microsoft Windows Server CI ( #4791 )
...
Due to a recent release that wasn't functioning properly this CI will help us catch the majority of Microsoft Node Quirks before they make it into a release.
2021-02-18 18:49:43 +00:00
John McLear
9f317f0798
bump version
2021-02-18 14:37:02 +00:00
snyk-bot
19bf97bd2d
fix: upgrade formidable from 1.2.1 to 1.2.2
...
Snyk has created this PR to upgrade formidable from 1.2.1 to 1.2.2.
See this package in npm:
https://www.npmjs.com/package/formidable
See this project in Snyk:
https://app.snyk.io/org/johnmclear/project/d9a12bfb-7ccd-443f-9e22-f30d339cc8c5?utm_source=github&utm_medium=upgrade-pr
2021-02-18 14:02:56 +00:00
snyk-bot
a380fc2abf
fix: upgrade tinycon from 0.0.1 to 0.6.8
...
Snyk has created this PR to upgrade tinycon from 0.0.1 to 0.6.8.
See this package in npm:
https://www.npmjs.com/package/tinycon
See this project in Snyk:
https://app.snyk.io/org/johnmclear/project/d9a12bfb-7ccd-443f-9e22-f30d339cc8c5?utm_source=github&utm_medium=upgrade-pr
2021-02-18 13:45:18 +00:00
snyk-bot
da65057bb1
fix: upgrade etherpad-yajsml from 0.0.2 to 0.0.4
...
Snyk has created this PR to upgrade etherpad-yajsml from 0.0.2 to 0.0.4.
See this package in npm:
https://www.npmjs.com/package/etherpad-yajsml
See this project in Snyk:
https://app.snyk.io/org/johnmclear/project/d9a12bfb-7ccd-443f-9e22-f30d339cc8c5?utm_source=github&utm_medium=upgrade-pr
2021-02-18 04:33:40 -05:00
Richard Hansen
30dbdf29f4
import: Convert arrow function to regular function
...
This fixes a bug introduced in commit
b711ff6acf
. Some time between when that
commit was originally written and when it was merged a round of
linting had converted the function from a regular function to an arrow
function because `this` was never in the body of the function. When I
rebased the commit, which introduced `this` to the body, I didn't
catch the error.
2021-02-18 03:42:56 -05:00
Richard Hansen
fb745374c3
import: Improve error logging
2021-02-18 03:42:41 -05:00
John McLear
29f2cd34f0
build: fix build path for windows
2021-02-17 20:38:10 +00:00
Richard Hansen
8ef0860e8b
tests: Restore runnerBackend.sh
( #4803 )
...
* tests: Restore `runnerBackend.sh`
`runnerBackend.sh` was deleted in commit
7dae5e3db8
but plugins still need it
until their GitHub workflow definitions have been updated.
Co-authored-by: John McLear <john@mclear.co.uk>
2021-02-17 04:35:57 -05:00
Richard Hansen
7dae5e3db8
tests: Use the supertest agent from common.js
for backend tests
2021-02-16 21:13:35 -05:00
Richard Hansen
5a91cf1b49
tests: Disable rate limiting for backend tests
2021-02-16 21:13:35 -05:00
Richard Hansen
4ae8fbc40d
tests: Increase importexportGetPost.js
timeouts
...
The tests were timing out on my machine.
2021-02-16 21:13:35 -05:00
Richard Hansen
3d2f77f75d
lint: Fix ESLint errors in backend tests
2021-02-16 21:13:35 -05:00
Richard Hansen
00d45e3229
Defer rate limiter creation to a hook call
...
This makes it possible to change the rate limiter settings via
`/admin/settings` or by modifying the appropriate settings object and
reinvoking the hook.
2021-02-16 21:13:35 -05:00
Richard Hansen
d7ed71eba0
plugins: Fix "Error: spawn npm ENOENT" error on Windows
...
On Windows, npm should be invoked as `npm.cmd`, not `npm`. Use a
drop-in replacement for `child_process.spawn()` that does the right
thing on Windows.
2021-02-16 22:00:20 +00:00
John McLear
2e92e8e9d0
tests: frontend test button increase timeouts
2021-02-16 16:38:59 +00:00
snyk-bot
b06e47c06e
fix: src/bin/doc/package.json & src/bin/doc/package-lock.json to reduce vulnerabilities
...
The following vulnerabilities are fixed with an upgrade:
- https://snyk.io/vuln/SNYK-JS-MARKED-584281
2021-02-16 11:10:46 +00:00
snyk-bot
095edb5043
fix: upgrade express-rate-limit from 5.1.1 to 5.2.3
...
Snyk has created this PR to upgrade express-rate-limit from 5.1.1 to 5.2.3.
See this package in npm:
https://www.npmjs.com/package/express-rate-limit
See this project in Snyk:
https://app.snyk.io/org/johnmclear/project/d9a12bfb-7ccd-443f-9e22-f30d339cc8c5?utm_source=github&utm_medium=upgrade-pr
2021-02-16 11:05:49 +00:00
Richard Hansen
c39d0606cf
ace2_inner: Delete special arrow key handling
...
I can't see any reason this would be necessary, and it appears to not
behave as intended (`scroll.scrollWhenPressArrowKeys()` is not invoked
after a continuously held arrow key is finally let up).
2021-02-16 11:03:31 +00:00
Richard Hansen
72704a9fbd
release: Update the doc/latest
symlink
2021-02-16 10:37:07 +00:00
Richard Hansen
345f5227fd
release: Use log4js to improve message readability
2021-02-16 10:37:07 +00:00
Richard Hansen
899f2e02f3
release: Reset Git repo on error
2021-02-16 10:37:07 +00:00
Richard Hansen
ba32f71f30
release: Automate more steps
2021-02-16 10:37:07 +00:00
Richard Hansen
18c8838a33
release: Stricter checking of CHANGELOG.md
2021-02-16 10:37:07 +00:00
Richard Hansen
5c48ebb406
release: Fix wrapping of log message
2021-02-16 10:37:07 +00:00
Richard Hansen
5816fd5f2f
release: Add git sanity checks
2021-02-16 10:37:07 +00:00
Richard Hansen
a814893ca3
release: Assume ../ether.github.com
exists
2021-02-16 10:37:07 +00:00
Richard Hansen
8db6b5da4a
release: Don't capture stdout when unnecessary
...
This should make it easier to troubleshoot issues.
2021-02-16 10:37:07 +00:00
Richard Hansen
83b55eb41f
release: Shorthand function for running a command
2021-02-16 10:37:07 +00:00
Richard Hansen
2691d556fe
release: Enforce lockfileVersion 1
2021-02-16 10:37:07 +00:00
Richard Hansen
1ada0ab5d6
release: cd to Etherpad root directory
2021-02-16 10:37:07 +00:00
Richard Hansen
565d020876
release: Make sure JSON ends with \n
2021-02-16 10:37:07 +00:00
Richard Hansen
ea4b2ef8fb
release: Factor out JSON read/write for later reuse
2021-02-16 10:37:07 +00:00
Richard Hansen
8155d6154d
release: Don't create release/x.y.z
branch
...
Patch-specific release branches should never diverge from the tag, so
they serve no useful purpose. (If they do diverge, which some did
before I deleted them all, what does it mean? Are we going to move the
tag in the future? It's just too confusing.)
In the future we might want to do major- or minor-specific
branches (e.g., `release/1` or `release/1.8`), but only if we want to
maintain old releases. For example, if 2.0 is a major release that
doesn't work with plugins designed for 1.x we might want to maintain a
`release/1` branch that continues to get bugfixes while the bulk of
new work continues to land on `develop`. If we do decide to maintain
old releases we'll need a new set of release scripts (or edit the
`release.js` script on the `release/1` branch).
2021-02-16 10:37:07 +00:00
John McLear
e1dcaa5210
release: Better steps for release procedure
2021-02-16 10:37:07 +00:00
John McLear
655ae90464
release: Exclude var/
during Windows build
2021-02-16 10:37:07 +00:00
Richard Hansen
d5969507cd
release: Clone docs repo in ..
2021-02-16 10:37:07 +00:00
Richard Hansen
bdd32f8915
Replace node_modules/ep_etherpad-lite
with src
2021-02-16 10:35:05 +00:00
snyk-bot
269c6d09c5
fix: upgrade npm from 6.14.8 to 6.14.11
...
Snyk has created this PR to upgrade npm from 6.14.8 to 6.14.11.
See this package in npm:
https://www.npmjs.com/package/npm
See this project in Snyk:
https://app.snyk.io/org/johnmclear/project/d9a12bfb-7ccd-443f-9e22-f30d339cc8c5?utm_source=github&utm_medium=upgrade-pr
2021-02-15 18:35:59 -05:00
snyk-bot
ed02606c4b
fix: upgrade semver from 5.6.0 to 5.7.1
...
Snyk has created this PR to upgrade semver from 5.6.0 to 5.7.1.
See this package in npm:
https://www.npmjs.com/package/semver
See this project in Snyk:
https://app.snyk.io/org/johnmclear/project/d9a12bfb-7ccd-443f-9e22-f30d339cc8c5?utm_source=github&utm_medium=upgrade-pr
2021-02-15 21:54:50 +00:00
John McLear
c0f73e6672
bump version
2021-02-15 12:47:20 -05:00
John McLear
b7e88cb904
security: New setting for Socket.IO maxHttpBufferSize
2021-02-15 12:45:31 -05:00
Richard Hansen
ed93ef5636
/admin/settings: Reload plugins, call loadSettings
hook on restart
...
This should match the normal startup procedure a bit more closely.
2021-02-15 08:43:14 +00:00
Guilherme Goncalves
3ff244f7a0
Update lines with zero height on sidediv
...
Avoid evaluation of `0` height as false within `if` condition,
since it is possible having 0px as line-height.
2021-02-15 00:42:00 -05:00
Egil
9c7dcb1d0a
eejs: Upgrade ejs to the latest version
...
The type of ejs's `__output` variable is now string instead of array
of strings, so the handling of `__output` had to change.
2021-02-14 23:36:53 -05:00
John McLear
615e47114b
Revert "socketio: increase socketio limit to 1MiB"
...
This reverts commit 55c96e5577
.
2021-02-14 16:53:48 +00:00
Richard Hansen
b711ff6acf
import: Ajaxify pad import
...
This eliminates an inline script (good for Content Security Policy)
and improves the user experience.
2021-02-14 08:35:38 +00:00
Richard Hansen
fba55fa6cf
ImportHandler: Refactor doImport()
for readability
2021-02-14 08:35:38 +00:00
Richard Hansen
28b28866a2
ImportHandler: Move the logger up
...
Also change the name to something shorter.
2021-02-14 08:35:38 +00:00
Richard Hansen
26b5a69ccc
ImportHandler: Use JSON.stringify()
to properly escape characters
2021-02-14 08:35:38 +00:00
Richard Hansen
ed80883709
ImportHandler: Lint the response script sent to the browser
2021-02-14 08:35:38 +00:00
Richard Hansen
0ff131bbbb
ImportHandler: Throw Errors, not strings
2021-02-14 08:35:38 +00:00
Richard Hansen
908635a1de
ImportHandler: Use return reject(...)
to avoid double settle
2021-02-14 08:35:38 +00:00
Richard Hansen
e01059dce5
ImportHandler: Switch to fs/promises
API
2021-02-14 08:35:38 +00:00
Richard Hansen
5b1b030906
ImportHandler: Use asynchronous rename instead of fs.renameSync()
2021-02-14 08:35:38 +00:00
Richard Hansen
c7b1abebe4
ImportHandler: Avoid deprecated fs.exists()
function
2021-02-14 08:35:38 +00:00
Richard Hansen
008209b0e0
ImportHandler: Delete redundant variable
2021-02-14 08:35:38 +00:00
Richard Hansen
cc52811cd0
pad_impexp: Use jQuery to build the import failure popup
...
This reduces the chances of accidentally introducing an XSS
vulnerability.
2021-02-14 08:35:38 +00:00
Richard Hansen
d869d96a2b
pad_impexp: Simplify creation of import failure message
2021-02-14 08:35:38 +00:00
Richard Hansen
890e16f6fc
pad_impexp: Style fixes to improve readability
2021-02-14 08:35:38 +00:00
Richard Hansen
efe07cd027
pad_impexp: Invert logic to improve readability
2021-02-14 08:35:38 +00:00
Richard Hansen
ce4ce8ce95
pad_impexp: Delete unnecessary importFailed
wrapper
2021-02-14 08:35:38 +00:00
Richard Hansen
8a221ca773
pad: Delete dead code
2021-02-14 08:35:38 +00:00
Richard Hansen
48205c1ddb
import/export: Make sure Express sees async errors
...
Express v4.x does not check to see if a Promise returned from a
middleware function will be rejected, so explicitly pass the Promise
rejection reason to `next()`.
We can revert this change after we upgrade to Express v5.0.
See https://expressjs.com/en/guide/error-handling.html for details.
2021-02-14 08:35:38 +00:00
John McLear
f59e0993a6
tests: test runner output HTML and CSS improvements to show duration ( #4775 )
2021-02-14 08:04:50 +00:00
Richard Hansen
e674d9789e
express: Change httpUptime
to httpStartTime
( #4777 )
...
It's better to provide a primitive value and let the consumer of the
metric do math if desired.
Co-authored-by: John McLear <john@mclear.co.uk>
2021-02-14 07:50:10 +00:00
John McLear
e585d321f9
tests: timeouts for tests ( #4773 )
2021-02-13 19:00:06 +00:00
Richard Hansen
f9ec49d7ac
tests: Improve /admin/settings
restart test
2021-02-13 10:02:28 +00:00
Richard Hansen
ac52fb8a9d
express: New httpUptime
metric
2021-02-13 10:02:28 +00:00
John McLear
e22d8dffc0
deps: use ci --no-optional flags, this might break some things as it requires npm 6.31.4
2021-02-13 10:01:36 +00:00
John McLear
483f4344c2
performance: maxAge for favicon and plugin definitions ( #4761 )
2021-02-13 08:13:48 +00:00
Richard Hansen
09e9c36098
tests: Accept async condition functions for helper.waitFor()
2021-02-13 08:12:53 +00:00
Richard Hansen
8dca4cb16f
tests: Give helper.waitFor()
timeout errors a useful stack trace
2021-02-13 08:12:53 +00:00
Richard Hansen
71c1899164
tests: Asyncify tests in api.js
2021-02-13 08:12:53 +00:00
Richard Hansen
e0f499cf5a
tests: Use the supertest agent from common.js
for api.js
2021-02-13 08:12:53 +00:00
Richard Hansen
08124ba733
tests: Delete unnecessary describe()
calls in api.js
2021-02-13 08:12:53 +00:00
Richard Hansen
fc9b22475a
tests: Always call backend common.init()
at startup
...
This provides a place to set the timeout for `common.init()` so that
individual tests don't have to.
2021-02-13 08:12:53 +00:00
Richard Hansen
6953e40c75
tests: Wait for common.init()
to complete before returning
2021-02-13 08:12:53 +00:00
Richard Hansen
1c8a913411
lint: Delete unnecessary eslint-disable-line
comment
2021-02-13 08:12:53 +00:00
Richard Hansen
d56a02c85a
express: Forcibly terminate HTTP connections when restarting
...
This should make restarts via `/admin` actions (e.g., plugin
installation) more reliable.
2021-02-13 07:37:22 +00:00
John McLear
4c4c7b526d
performance: i18n maxage ( #4759 )
2021-02-13 02:35:25 -05:00
Richard Hansen
01c83917d1
socket.io: Manually track client connections/disconnections
...
This change is required for socket.io 3.x because in 3.x
`io.sockets.clients()` no longer returns all client Socket objects.
2021-02-13 07:13:37 +00:00
Richard Hansen
66544be354
lint: src/tests/backend/specs/api/api.js
2021-02-13 00:46:30 -05:00
Richard Hansen
eb9d5bb470
lint: src/tests/frontend/helper.js
and friends
2021-02-13 00:46:30 -05:00
Richard Hansen
8f2f6593be
lint: Re-run eslint --fix
2021-02-13 00:31:36 -05:00
Richard Hansen
db8ca2818f
lint: Treat helper.js
and friends as normal browser files
...
This enables the prefer-arrow/prefer-arrow-functions rule.
2021-02-13 00:29:30 -05:00
John McLear
55c96e5577
socketio: increase socketio limit to 1MiB
2021-02-12 17:56:50 -05:00
John McLear
fcd9adf20d
tests: admin test timeout increase, bugfix and removal of buggy test ( #4762 )
2021-02-12 20:04:42 +00:00
Richard Hansen
73d31b12a8
Minify: Replace deprecated url.parse()
with new URL()
2021-02-12 07:08:51 +00:00
Richard Hansen
7efca7dc7d
Minify: Don't ignore request headers in requestURI()
2021-02-12 07:08:51 +00:00
Richard Hansen
7a003cb9e2
Minify: Let Express render the 500 error page
2021-02-12 07:08:51 +00:00
Richard Hansen
44e420b6c5
Minify: Return Date
objects from statFile()
2021-02-12 07:08:51 +00:00
Richard Hansen
aa11667ff7
Minify: Use fs.promises
2021-02-12 07:08:51 +00:00
Richard Hansen
073052ac66
Minify: Asyncify minify()
2021-02-12 07:08:51 +00:00
Richard Hansen
3eefe71834
Minify: Don't set cache headers if statFile()
causes 500
2021-02-12 07:08:51 +00:00
Richard Hansen
84190793dc
Minify: Asyncify getFileCompressed()
2021-02-12 07:08:51 +00:00
Richard Hansen
dd7ea1a8f9
Minify: Asyncify statFile()
2021-02-12 07:08:51 +00:00
Richard Hansen
947dc8eeed
Minify: Asyncify getFile()
2021-02-12 07:08:51 +00:00
Richard Hansen
5d7c07e81c
Minify: Asyncify lastModifiedDateOfEverything()
2021-02-12 07:08:51 +00:00
Richard Hansen
e573276755
Minify: Asyncify getAceFile()
2021-02-12 07:08:51 +00:00
Richard Hansen
5cc191f185
Minify: Replace async.forEach()
with Promise.all()
2021-02-12 07:08:51 +00:00
Richard Hansen
0c428e068e
Minify: Use Promise.all()
to simplify requestURIs()
2021-02-12 07:08:51 +00:00
Richard Hansen
1ec29e0d45
Minify: Asyncify requestURI()
2021-02-12 07:08:51 +00:00
Richard Hansen
a952df2cf5
Minify: Un-export requestURI()
...
Nobody outside this file uses it.
2021-02-12 07:08:51 +00:00
Richard Hansen
d9607f7c66
static: Asyncify
2021-02-12 07:08:51 +00:00
Richard Hansen
7f4a7156e2
Minify: Move getTar()
to static.js
...
`static.js` is the only file that uses it.
2021-02-12 07:08:51 +00:00
Richard Hansen
996dc81825
Minify: Move tar processing into a function
...
This reduces the overhead of `require()`ing the module, and it will
make it easier for a future commit to asyncify everything in
`Minify.js`.
2021-02-12 07:08:51 +00:00
Richard Hansen
8ae8710a14
ace: Fix EMBEDDED check
2021-02-12 07:08:51 +00:00
Richard Hansen
50929fe7f7
express: Call expressConfigure, expressCreateServer hooks asynchronously
2021-02-12 07:08:51 +00:00
Richard Hansen
8919f63c98
lint: Replace use of underscore.js with plain ECMAScript
2021-02-12 07:08:51 +00:00
John McLear
ab127289c4
security: limit socketio to 1M chars
2021-02-11 21:01:47 -05:00
Richard Hansen
085ab452a0
chat tests: Give some time to process each of the 140 chat messages
...
This avoids overflowing socket.io's receive buffer.
2021-02-11 21:01:47 -05:00
Richard Hansen
020df75677
chat tests: Asyncify
2021-02-11 21:01:47 -05:00
Richard Hansen
0fae34009d
chat tests: Delete unnecessary expect()
2021-02-11 21:01:47 -05:00
snyk-bot
f6df9ffad0
fix: upgrade measured-core from 1.11.2 to 1.51.1
...
Snyk has created this PR to upgrade measured-core from 1.11.2 to 1.51.1.
See this package in npm:
https://www.npmjs.com/package/measured-core
See this project in Snyk:
https://app.snyk.io/org/johnmclear/project/d9a12bfb-7ccd-443f-9e22-f30d339cc8c5?utm_source=github&utm_medium=upgrade-pr
2021-02-11 18:39:08 +00:00
John McLear
cc7f11560f
Fix OL list items not increasing ( #4749 )
...
* tests: additional test coverage for OL items
* parseInt means we can do a proper check
* tests: use ol check value test for #4748
2021-02-11 13:26:37 -05:00
snyk-bot
60a55ec428
fix: upgrade resolve from 1.1.7 to 1.19.0
...
Snyk has created this PR to upgrade resolve from 1.1.7 to 1.19.0.
See this package in npm:
https://www.npmjs.com/package/resolve
See this project in Snyk:
https://app.snyk.io/org/johnmclear/project/d9a12bfb-7ccd-443f-9e22-f30d339cc8c5?utm_source=github&utm_medium=upgrade-pr
2021-02-11 18:24:32 +00:00
snyk-bot
b50fcb065a
fix: upgrade underscore from 1.8.3 to 1.12.0
...
Snyk has created this PR to upgrade underscore from 1.8.3 to 1.12.0.
See this package in npm:
https://www.npmjs.com/package/underscore
See this project in Snyk:
https://app.snyk.io/org/johnmclear/project/d9a12bfb-7ccd-443f-9e22-f30d339cc8c5?utm_source=github&utm_medium=upgrade-pr
2021-02-11 18:18:11 +00:00
translatewiki.net
2f1d648787
Localisation updates from https://translatewiki.net .
2021-02-11 18:48:51 +01:00
Richard Hansen
2301c6ec83
pad: Don't throw on socket.io error
2021-02-11 17:25:09 +00:00
Richard Hansen
fc9f236977
plugins: Use npm ls
to list the installed plugins
...
This speeds up startup considerably, and we get rid of a lot of buggy
code.
This works with both npm v6.x and v7.x.
2021-02-09 22:18:35 +00:00
Richard Hansen
ce1b69feda
plugins: Helper function to run the npm
CLI
2021-02-09 22:18:35 +00:00
Richard Hansen
83a519941b
/admin/plugins: Fix logging of error messages
2021-02-09 22:18:35 +00:00
John McLear
94a65062c7
checkPlugins: remove lib/travis.yml and add github badges if they aren't present ( #4731 )
...
A future PR should remove all Travis badges and CI jobs.
2021-02-09 09:41:41 +00:00
Richard Hansen
ebdb2798ff
server: Fix handling of errors during startup and shutdown
...
Before, an unhandled rejection or uncaught exception during startup
would cause `exports.exit()` to wait forever for startup completion.
Similarly, an error during shutdown would cause `exports.exit()` to
wait forever for shutdown to complete. Now any error during startup or
shutdown triggers an immediate exit.
2021-02-09 08:57:24 +00:00
Richard Hansen
5999d8cd44
server: Only pass err
arg to exports.exit()
...
The `uncaughtException` event handlers are passed two arguments: error
and "origin". The `exports.exit()` argument doesn't expect a second
argument.
2021-02-09 08:57:24 +00:00
Richard Hansen
5b327b63ac
server: Simplify gating of state transition waiters
2021-02-09 08:57:24 +00:00
Richard Hansen
105f8b0ccb
server: Use a log4js logger object for logging
2021-02-09 08:57:24 +00:00
Richard Hansen
cb1116607e
Revert "backend tests: change loglevel to WARN ( #4514 )"
...
Logging verbosity of the openapi handlers was turned down so GitHub
should be happier with INFO now. This makes it easier to troubleshoot
problems.
This reverts commit b98aaf4904
.
2021-02-09 07:24:31 +00:00
Richard Hansen
1e3f352281
openapi: Turn down logging verbosity
2021-02-09 07:24:31 +00:00
Richard Hansen
714e099b2a
tests: Fix accidental functions in ordered_list.js
...
This fixes a bug introduced in commit
e9bb2c410e
.
2021-02-09 07:23:38 +00:00
Richard Hansen
e9bb2c410e
tests: Fix erroneous use of waitForPromise()
in ordered_list.js
...
`waitForPromise()` should always be used with `await` (either directly
or with a later `await` on the returned Promise). In this case,
the condition should be immediately true so `waitForPromise()` is not
the right tool here.
2021-02-08 18:24:11 +00:00
John McLear
7baa0cda02
tests: disabled checks shouldnt change behavior ( #4729 )
2021-02-08 11:07:07 +00:00
John McLear
9070c71e9f
color picker: allow full white
2021-02-08 11:01:27 +00:00
Richard Hansen
1c9afa5168
lint: src/static/js/ace.js
2021-02-07 20:04:07 +00:00
Richard Hansen
8668017c62
ace: Use globalThis
instead of non-strict default context
...
This is necessary before `'use strict';` can be added to the top of
the file.
2021-02-07 20:04:07 +00:00
Richard Hansen
3c2e0f0e16
ace: Simplify Ace2Editor method creation
...
* Delete the unused `optDoNow` parameter from `pendingInit()`.
* Move the `setAuthorInfo()` 1st parameter check out of the wrapper
and in to the `setAuthorInfo()` function itself.
2021-02-07 20:04:07 +00:00
John McLear
865a463154
fix: release script output
2021-02-07 19:28:00 +00:00
John McLear
2b112ac851
tests: Admin Frontend Test Coverage( #4717 )
...
Covers all frontend admin operations, runs separated in CI.
2021-02-07 11:32:57 +00:00
Richard Hansen
294f2a251f
lint: Fix bugs and style issues introduced in PR #4718
...
This fixes issues introduced in commit
f8a19c4527
.
2021-02-07 07:51:35 +00:00
Richard Hansen
0ff8274d2e
tests: Fix waitForPromise()
in enter.js
2021-02-07 07:13:04 +00:00
Richard Hansen
c625c611d2
tests: delete src/tests/frontend/specs/caret.js
...
All of the tests in this file are commented out so this file does
nothing. We can uncomment the code and clean it up, but the approach
taken in these tests will never work: For security reasons, browsers
do not allow synthetic key events to perform the default
behavior (such as moving the carent when an arrow key is pressed).
There are two ways to test responses to navigation keys:
* Use WebDriver to create "genuine" keyboard events.
* Suppress the default behavior and implement caret movement
ourselves. This is tremendously complicated, especially arrow
up/down.
2021-02-07 07:02:23 +00:00
John McLear
1f0cb01110
tests: fix enter test
2021-02-07 07:00:12 +00:00
John McLear
f8a19c4527
lint: lint and various fixes of frontend test specs
2021-02-07 06:39:03 +00:00
John McLear
e02246641e
ordered lists bugfix: first line item can be 0.*, don't show 0 as undefined ( #4600 )
2021-02-06 20:19:05 +00:00
John McLear
4862d6fa9c
editor: fix enter key keep line in view ( #4639 )
2021-02-06 19:56:59 +00:00
John McLear
c969ae58c2
stats: activePads & lastDisconnected stats
2021-02-06 19:53:52 +00:00
John McLear
5f58ce14d6
editor: remove grayed logic and styles so background color is not lost on disconnect/reconnect.
2021-02-06 09:58:10 +00:00
Richard Hansen
8b28e00784
restructure: Prefix bin/
and tests/
with src/
...
This is a follow-up to commit
2ea8ea1275
.
2021-02-05 21:52:08 +00:00
John McLear
2ea8ea1275
restructure: move bin/ and tests/ to src/
...
Also add symlinks from the old `bin/` and `tests/` locations to avoid
breaking scripts and other tools.
Motivations:
* Scripts and tests no longer have to do dubious things like:
require('ep_etherpad-lite/node_modules/foo')
to access packages installed as dependencies in
`src/package.json`.
* Plugins can access the backend test helper library in a non-hacky
way:
require('ep_etherpad-lite/tests/backend/common')
* We can delete the top-level `package.json` without breaking our
ability to lint the files in `bin/` and `tests/`.
Deleting the top-level `package.json` has downsides: It will cause
`npm` to print warnings whenever plugins are installed, npm will
no longer be able to enforce a plugin's peer dependency on
ep_etherpad-lite, and npm will keep deleting the
`node_modules/ep_etherpad-lite` symlink that points to `../src`.
But there are significant upsides to deleting the top-level
`package.json`: It will drastically speed up plugin installation
because `npm` doesn't have to recursively walk the dependencies in
`src/package.json`. Also, deleting the top-level `package.json`
avoids npm's horrible dependency hoisting behavior (where it moves
stuff from `src/node_modules/` to the top-level `node_modules/`
directory). Dependency hoisting causes numerous mysterious
problems such as silent failures in `npm outdated` and `npm
update`. Dependency hoisting also breaks plugins that do:
require('ep_etherpad-lite/node_modules/foo')
2021-02-04 17:15:08 -05:00
Richard Hansen
5a865dfc7e
pluginfw: Delete unused return value
2021-02-04 08:41:00 +00:00
Richard Hansen
a145b97682
pluginfw: Use for
loops to improve readability
2021-02-04 08:41:00 +00:00
Richard Hansen
fdaacc44c8
pluginfw: Replace slide.asyncMap()
with Promise.all()
2021-02-04 08:41:00 +00:00
Richard Hansen
746cc8cc34
pluginfw: In-line formatPluginsWithVersion()
...
There's only one caller of the function, so move the logic to where it
is used.
2021-02-04 08:41:00 +00:00
Richard Hansen
cd1d322af4
/admin/plugins/info: Move logic to .js
file
2021-02-04 08:41:00 +00:00
Richard Hansen
c5f0274116
lint: Move functions up to fix more lint errors
2021-02-04 08:41:00 +00:00
Richard Hansen
99ca57f3ab
lint: src/static/js/pluginfw/shared.js
2021-02-04 08:41:00 +00:00
Richard Hansen
2c80c1f2da
lint: src/static/js/pluginfw/read-installed.js
2021-02-04 08:41:00 +00:00
Richard Hansen
2b32bc1840
lint: src/static/js/pluginfw/plugins.js
2021-02-04 08:41:00 +00:00
Richard Hansen
9a86ebec2a
pluginfw: Fix state reset logic
2021-02-04 08:41:00 +00:00
Richard Hansen
895764e047
pluginfw: Return from findUnmet()
early if not given an object
...
For some reason strings are sometimes passed to `findUnmet()`, which
is obviously unexpected given the way the code is written. Rather than
figure out why strings are passed and how to safely avoid passing
strings, just return early. The net effect is the same, but returning
early avoids setting a property on a string, which is prohibited in
strict mode.
2021-02-04 08:41:00 +00:00
Richard Hansen
a06662fd00
pluginfw: Delete commented-out code
2021-02-04 08:41:00 +00:00
Richard Hansen
c64ee6ff4c
pluginfw: Call npm.load()
before using npm
...
This code is only used when testing `read-installed.js` by running it
directly (e.g., `node src/static/js/pluginfw/read-installed.js`).
2021-02-04 08:41:00 +00:00
translatewiki.net
a5bde7982a
Localisation updates from https://translatewiki.net .
2021-02-04 08:58:26 +01:00
freddii
ea202e41f6
docs: fixed typos
2021-02-03 00:30:07 +01:00
Richard Hansen
05e0e8dbf7
hooks: New callAllSerial()
function
...
This is necessary to migrate away from `callAll()` (which only
supports synchronous hook functions).
2021-02-02 09:09:02 +00:00
Richard Hansen
763fe6fc26
hooks: Document callFirst()
and aCallFirst()
2021-02-02 09:09:02 +00:00
Richard Hansen
6f30ea7c38
hooks: Use callHookFn{Sync,Async}()
for {call,aCall}First()
...
Benefits of `callHookFnSync()` and `callHookFnAsync()`:
* They are a lot more forgiving than `hookCallWrapper()` was.
* They perform useful sanity checks.
* They have extensive unit test coverage.
* They make the behavior of `callFirst()` and `aCallFirst()` match
the behavior of `callAll()` and `aCallAll()`.
2021-02-02 09:09:02 +00:00
Richard Hansen
c11d60c5f6
hooks: Check context nullness, not truthiness
2021-02-02 09:09:02 +00:00
Richard Hansen
fd5d3ce777
hooks: Inline aCallFirst()
into exports.aCallFirst()
2021-02-02 09:09:02 +00:00
Richard Hansen
77f480d954
hooks: Asyncify aCallFirst
2021-02-02 09:09:02 +00:00
Richard Hansen
22d02dbcbf
hooks: Factor out value normalization
2021-02-02 09:09:02 +00:00
Richard Hansen
f316a3bacd
hooks: Never pass a falsy error to a callback
2021-02-02 09:09:02 +00:00
Richard Hansen
708206449a
hooks: Factor out callback attachment
...
The separate function will be reused in a future commit.
2021-02-02 09:09:02 +00:00
Richard Hansen
13e806ad7a
hooks: Inline mapFirst()
into aCallFirst()
for readability
...
There's only one caller of the function, and the function is simple,
so there's no need for a separate function.
2021-02-02 09:09:02 +00:00
Richard Hansen
4ab7a99512
hooks: Inline syncMapFirst()
into callFirst()
for readability
...
There's only one caller of the function, and the function is simple,
so there's no need for a separate function.
2021-02-02 09:09:02 +00:00
Richard Hansen
53ccfa8703
hooks: Asyncify mapFirst
2021-02-02 09:09:02 +00:00
Richard Hansen
0b83ff8ec2
hooks: Simplify syncMapFirst
iteration
2021-02-02 09:09:02 +00:00
Richard Hansen
c89db33ff0
hooks: Refine caveat comments about function parameter count
2021-02-02 09:09:02 +00:00
Richard Hansen
f02f288e80
hooks: Rename args
to context
for consistency
2021-02-02 09:09:02 +00:00
Richard Hansen
7dba847f21
hooks: Don't export syncMapFirst
or mapFirst
...
Nobody uses these functions outside of this file.
2021-02-02 09:09:02 +00:00
Richard Hansen
6b42dabf6c
hooks: Delete unused bubbleExceptions
setting
2021-02-02 09:09:02 +00:00
Richard Hansen
47f0a7dacf
lint: Fix more ESLint errors
2021-02-02 09:09:02 +00:00
Richard Hansen
1bc52f4913
hooks: Remove unnecessary callAllStr()
function
2021-02-02 09:09:02 +00:00
translatewiki.net
5b701b97c3
Localisation updates from https://translatewiki.net .
2021-02-01 15:21:50 +01:00
John McLear
b3dda3b11c
lint: src/static/js/pluginfw/*.js
2021-01-30 17:00:40 -05:00
John McLear
0cc8405e9c
Bump minimum required Node.js version to 10.17.0
...
This makes it possible to use fs.promises.
2021-01-30 17:00:40 -05:00
Richard Hansen
877f0c5883
server: Use wtfnode to log reasons why node isn't exiting
2021-01-30 08:05:08 +00:00
Richard Hansen
ba81ead101
server: Remove all other signal listeners
2021-01-30 08:05:08 +00:00
Richard Hansen
ecdb105bfe
server: Refine process lifetime management
...
Define states and use them to properly handle multiple calls to
`start()`, `stop()`, and `exit()`. (Multiple calls to `exit()` can
happen if there is an uncaught exception or signal during shutdown.)
This should also make it easier to add support for cleanly restarting
the server after a shutdown (for tests or via an `/admin` page).
2021-01-30 08:05:08 +00:00
Richard Hansen
725023fe58
server: Refactor stop()
to avoid no-async-promise-executor lint error
...
Also log when Etherpad has stopped.
2021-01-30 08:05:08 +00:00
Richard Hansen
d339f2a671
server: Perform init after adding uncaught exception handler
...
This avoids an unnecessary `try` block.
2021-01-30 08:05:08 +00:00
Richard Hansen
86ceb2b610
server: Exit on unhandled Promise rejection
2021-01-30 08:05:08 +00:00
John McLear
5bcd6f44a5
lint: skin-variants ( #4603 )
...
* lint: skin-variants
* for squash: Fix attachment of event listener
Before this PR the statement was outside the function. I'm assuming
the move into the function body was accidental, so move it back out.
* for squash: Preserve order of function calls
Co-authored-by: Richard Hansen <rhansen@rhansen.org>
2021-01-30 07:32:12 +00:00
John McLear
29179e512f
lint: skiplist
2021-01-30 00:52:55 -05:00
John McLear
f72ce463ef
lint: undomodule
2021-01-30 00:51:29 -05:00
Richard Hansen
89bcfa2b4a
tests: Stop using nyc
...
There are some problems with nyc:
* The coverage numbers aren't useful in our case because most of the
code is executed outside the test process (the test code is mostly
API client logic).
* nyc messes with line numbers, which makes it much harder to debug
problems.
* We're seeing frequent SIGABRT crashes while nyc is printing the
results table. I'm not sure if nyc is the cause of the crashes, or
if it's making a race condition worse, or if the crashes have
nothing to do with nyc, but we don't lose much by removing it so
we might as well see if the crash frequency improves.
2021-01-29 09:17:17 +00:00
John McLear
0897a28e70
lint: AttributeManager
2021-01-29 09:16:50 +00:00
Richard Hansen
462530eafb
AttributeManager: Fix attribute name during attribute removal
...
Before this change, the `author` attribute was silently discarded
during `.map()` iteration and the name of the attribute to remove was
included twice with two different values.
2021-01-29 09:16:50 +00:00
Richard Hansen
8efc87f33a
AttributeManager: Fix bogus this
during attribute removal
...
Before this commit, the callback passed to `.map()` during attribute
removal was a normal function, not an arrow function. This meant that
the value of `this` in the function body depended on how the callback
was invoked. In this case, the callback was invoked without any
explicit context (it was not called as a method, nor was it called via
`.call()`, `.apply()`, or `.bind()`). Without any explicit context,
the value of `this` depends on strict mode. Currently the function is
in sloppy mode, so `this` refers to the "global this" object (a.k.a.,
`window`). It doesn't make sense for the callback to reference
`window.author`, so I'm assuming the previous behavior was a bug.
Now the function is an arrow function, so the value of `this` comes
from the enclosing lexical context, which in this case is the
AttributeManager object. I believe that was the original intention.
2021-01-29 09:16:50 +00:00
Richard Hansen
c1ef12b8da
lint: Re-run eslint --fix
2021-01-29 01:14:03 -05:00
Richard Hansen
b02ab430fe
Bump eslint-config-etherpad to 1.0.24
2021-01-29 01:10:58 -05:00
John McLear
5d7645e36a
lint: ace2_common.js linting
2021-01-29 00:53:59 -05:00
John McLear
f6eb6bd266
remove dead object code
2021-01-29 00:53:22 -05:00
translatewiki.net
989f42204f
Localisation updates from https://translatewiki.net .
2021-01-28 18:48:11 +01:00
Richard Hansen
7f392e12e9
tests: Create a src/tests/
symlink that points to tests/
...
This makes it possible for plugin backend tests to do
`require('ep_etherpad-lite/tests/backend/common')` to access the API
key (among other things).
Eventually we probably should reverse these (move `tests/` to
`src/tests/` and make `tests/` a symlink to `src/tests/`) and move
`bin/` to `src/bin/` so that we can avoid the top-level `package.json`
mess.
2021-01-28 10:02:58 +00:00
Richard Hansen
53092fa7af
db/Pad: Call padCopy and padRemove hooks asynchronously
2021-01-28 09:36:22 +00:00
Richard Hansen
e5b45cc984
contentcollector: Delete unnecessary dom
functions
...
And move the remaining functions out of the `makeContentCollector()`
function.
2021-01-27 04:59:36 +00:00
Richard Hansen
275f041fbb
contentcollector: Simplify child node access
2021-01-27 04:59:36 +00:00
Richard Hansen
1cb5453aeb
contentcollector: Skip over non-Text, non-Element Nodes
2021-01-27 04:59:36 +00:00
Richard Hansen
075969aea0
contentcollector: Fix Element tag name fetch
...
The `name` property is only available on cheerio's Element-like
objects; DOM Element objects do not have a `name` property. Switch to
`dom.tagName()` to fix the logic for browsers.
2021-01-27 04:59:36 +00:00
Richard Hansen
e3ec9d9a4c
contentcollector: Fix parent node access
...
The `parent` property is only available on cheerio's Node-like
objects; DOM Node objects do not have a `parent` property. Switch to
the `parentNode` property so that the code works in browsers as well
as cheerio.
2021-01-27 04:59:36 +00:00
Richard Hansen
1d36549152
contentcollector: Delete unnecessary parentheses
2021-01-27 04:59:36 +00:00
Richard Hansen
e3a47e48f9
contentcollector: Fix collectContentLineText hook
...
Before, the hook always ignored the return values provided by the hook
functions. Now the hook functions can change the text by either
returning a string or setting `context.text` to the desired value.
Also drop the `styl` and `cls` context properties. They were never
documented and they were always null.
2021-01-27 04:59:36 +00:00
Richard Hansen
4e220538a1
contentcollector: Use destructuring to improve readability
2021-01-27 04:59:36 +00:00
Richard Hansen
b547ce9a47
contentcollector: Invert logic to improve readability
2021-01-27 04:59:36 +00:00
Richard Hansen
b811030846
contentcollector: Delete unnecessary truthiness check
2021-01-27 04:59:36 +00:00
Richard Hansen
fc2420c244
contentcollector: Fix iteration over child Nodes
...
In the DOM, `.children` only includes children that are Element
objects. In cheerio 0.22.0, `.children` includes all child Nodes, not
just Elements. Use `dom.numChildNodes()` and `dom.childNode()` so that
browsers behave the same as cheerio.
2021-01-27 04:59:36 +00:00
Richard Hansen
d0bfb54c0a
contentcollector: Avoid for..in
iteration of object properties
...
`for..in` iterates over inherited properties, which is almost never
desired. In most cases there aren't any inherited enumerable
properties so it's not that big of a deal, but in the case of
HTMLCollection it's very bad because it iterates over every entry
twice (once by numerical index and once by name) plus it includes the
`length` property in the iteration.
2021-01-27 04:59:36 +00:00
Richard Hansen
3cfec58948
contentcollector: Rename dom
functions for consistency with DOM spec
2021-01-27 04:59:36 +00:00
Richard Hansen
8763c3bb29
contentcollector: Fix Element attribute accesses
...
The `attribs` property is only available on cheerio's Element-like
objects; DOM Element objects do not have an `attribs` property. Switch
to `dom.nodeAttr()` to fix the logic for browsers.
2021-01-27 04:59:36 +00:00
Richard Hansen
99625950c8
contentcollector: Factor out call to .toLowerCase()
2021-01-27 04:59:36 +00:00
Richard Hansen
dd7fb1babe
contentcollector: Document the dom
object
2021-01-27 04:59:36 +00:00
Richard Hansen
74bb2f76cc
contentcollector: Delete unused domInterface
parameter
2021-01-27 04:59:36 +00:00
Richard Hansen
42c25b2536
openapi: Fix error logging
2021-01-27 04:59:36 +00:00
Richard Hansen
54a3dbb9a0
lint: Fix some straightforward ESLint errors
2021-01-27 04:59:36 +00:00
Bartlomiej Witczak
4b4b685bba
fix: runtime error if no buttons are present in toolbar ( #4680 )
...
Co-authored-by: Bartek Witczak <bartek@dayone.pl>
2021-01-26 11:02:54 +00:00
Richard Hansen
b73b0bcb98
farbtastic: Minimize diff to upstream
...
This should make it easier to upgrade to the latest version.
2021-01-26 04:07:43 -05:00
Richard Hansen
a0745d74b9
farbtastic: Document where the code came from
2021-01-26 04:07:43 -05:00
John McLear
3a19254f21
stale code: removed excanvas which was ie support for no canvas
2021-01-26 04:05:54 -05:00
John McLear
7768871f8f
security: bumping socketio version due to vulnerability
2021-01-26 00:53:04 -05:00
John McLear
81b860bc35
tests: allow for longer timeout
2021-01-25 22:53:11 -05:00
John McLear
7421730b44
lint: src/node/utils/toolbar.js
2021-01-25 22:53:11 -05:00
John McLear
89aa8cf55e
lint: src/node/utils/randomstring.js
2021-01-25 22:53:11 -05:00
John McLear
21ef857d8a
lint: src/node/utils/promises.js
2021-01-25 22:53:11 -05:00
John McLear
b831feae66
lint: src/node/utils/path_exists.js
2021-01-25 22:53:11 -05:00
John McLear
4f7e322d53
lint: src/node/utils/padDiff.js
2021-01-25 22:53:11 -05:00
John McLear
9759e09387
lint: src/node/utils/customError.js
2021-01-25 22:53:11 -05:00
John McLear
f664f84da5
lint: src/node/utils/caching_middleware.js
2021-01-25 22:53:11 -05:00
John McLear
02c1bf7d81
lint: src/node/utils/UpdateCheck.js
2021-01-25 22:53:11 -05:00
John McLear
f8323eae89
lint: src/node/utils/TidyHtml.js
2021-01-25 22:53:11 -05:00
John McLear
31f1e39565
lint: src/node/utils/Settings.js
2021-01-25 22:53:11 -05:00
John McLear
af8ea6b45f
lint: src/node/utils/NodeVersion.js
2021-01-25 22:53:11 -05:00
John McLear
b11ba23208
lint: src/node/utils/MinifyWorker.js
2021-01-25 22:53:11 -05:00
John McLear
b5e04d867e
lint: src/node/utils/LibreOffice.js
2021-01-25 22:53:11 -05:00
John McLear
85d1dc8d71
lint: src/node/utils/ImportHtml.js
2021-01-25 22:53:11 -05:00
John McLear
a41b4b8e45
lint: src/node/utils/ImportEtherpad.js
2021-01-25 22:53:11 -05:00
John McLear
9fff82e370
lint: src/node/utils/ExportTxt.js
2021-01-25 22:53:11 -05:00
John McLear
bfabe7c297
lint: src/node/utils/ExportHtml.js
2021-01-25 22:53:11 -05:00
John McLear
c44c4edc10
lint: src/node/utils/ExportHelper.js
2021-01-25 22:53:11 -05:00
John McLear
a4764faded
lint: src/node/utils/ExportEtherpad.js
2021-01-25 22:53:11 -05:00
John McLear
52f60ceeaa
lint: src/node/utils/Cli.js
2021-01-25 22:53:11 -05:00
John McLear
60bc849be2
lint: src/node/utils/AbsolutePaths.js
2021-01-25 22:53:11 -05:00
John McLear
7afc809073
lint: src/node/utils/Abiword.js
2021-01-25 22:53:11 -05:00
John McLear
666dd7abd1
lint: src/node/padaccess.js
2021-01-25 22:53:11 -05:00
John McLear
6054f6d93f
lint: src/node/hooks/i18n.js
2021-01-25 22:53:11 -05:00
John McLear
2dec36bfd7
lint: src/node/hooks/express/tests.js
2021-01-25 22:53:11 -05:00
John McLear
6df3eadecd
lint: src/node/hooks/express/static.js
2021-01-25 22:53:11 -05:00
John McLear
09fc7438ea
lint: src/node/hooks/express/specialpages.js
2021-01-25 22:53:11 -05:00
John McLear
72ddf35426
lint: src/node/hooks/express/padurlsanitize.js
2021-01-25 22:53:10 -05:00
John McLear
43ce0f839b
lint: src/node/hooks/express/padreadonly.js
2021-01-25 22:53:10 -05:00
John McLear
2f9a3ec655
lint: src/node/hooks/express/openapi.js
2021-01-25 22:53:10 -05:00
John McLear
18ebf7b69a
lint: src/node/hooks/express/isValidJSONPName.js
2021-01-25 22:53:10 -05:00
John McLear
3571eb7c32
lint: src/node/hooks/express/importexport.js
2021-01-25 22:53:10 -05:00
John McLear
3cf6e1f015
lint: src/node/hooks/express/errorhandling.js
2021-01-25 22:53:10 -05:00
John McLear
4de2844af2
lint: src/node/hooks/express/apicalls.js
2021-01-25 22:53:10 -05:00
John McLear
fbc70c1276
lint: src/node/hooks/express/adminplugins.js
2021-01-25 22:53:10 -05:00
John McLear
3a586a7aad
lint: src/node/hooks/express/admin.js
2021-01-25 22:53:10 -05:00
John McLear
acf889b7de
lint: src/node/handler/SocketIORouter.js
2021-01-25 22:53:10 -05:00
John McLear
532bde71f7
lint: src/node/handler/PadMessageHandler.js
2021-01-25 22:53:10 -05:00
John McLear
841d45cbe1
lint: src/node/handler/ImportHandler.js
2021-01-25 22:53:10 -05:00
John McLear
2fe5d1f873
lint: src/node/handler/ExportHandler.js
2021-01-25 22:53:10 -05:00
John McLear
a7d9a703cd
lint: src/node/handler/APIHandler.js
2021-01-25 22:53:10 -05:00
John McLear
ee9bb019b2
lint: src/node/easysync_tests.js
2021-01-25 22:53:10 -05:00
John McLear
8fb6912fc9
lint: src/node/db/SessionStore.js
2021-01-25 22:53:09 -05:00
John McLear
3681f72afd
lint: src/node/db/SessionManager.js
2021-01-25 17:56:28 -05:00
John McLear
93bc21b5f3
lint: src/node/db/SecurityManager.js
2021-01-25 17:56:28 -05:00
John McLear
5ce255c789
lint: src/node/db/ReadOnlyManager.js
2021-01-25 17:56:28 -05:00
John McLear
e06b9442e0
lint: src/node/db/PadManager.js
2021-01-25 17:56:28 -05:00
John McLear
f0c26c9ba2
lint: src/node/db/Pad.js
2021-01-25 17:56:27 -05:00
John McLear
5ecb3f9f37
lint: src/node/db/GroupManager.js
2021-01-25 17:56:27 -05:00
John McLear
8aa729a36f
lint: src/node/db/AuthorManager.js
2021-01-25 17:56:27 -05:00
John McLear
d9225f326f
lint: src/node/db/API.js
2021-01-25 17:56:27 -05:00
translatewiki.net
f0cafe88f2
Localisation updates from https://translatewiki.net .
2021-01-25 18:04:09 +01:00
John McLear
ee158b0fe5
bugfix: bump ueberdb to 1.2.5 to resolve #4645 which caused a users color not to be persistent
2021-01-23 13:54:50 +00:00
John McLear
f0a77cb98c
lint: contentcollector and domline
...
Various tidy up and linting of contentcollector.js and domline.js.
3 Tests disabled which are not due to be covered.
Co-authored-by: Richard Hansen <rhansen@rhansen.org>
2021-01-22 20:41:14 +00:00
Richard Hansen
10a91825fc
ace2_inner: Fix argument bug in execCommand()
...
This fixes a bug introduced in commit
c38c34bef4
.
2021-01-22 17:02:38 +00:00
Richard Hansen
aeedaac04e
ace2_inner: Improve readability of object creation
2021-01-22 17:02:38 +00:00
Richard Hansen
2f430e3a5a
ace2_inner: Fix some ESLint errors
2021-01-22 17:02:38 +00:00
Richard Hansen
0bfabfef5d
ace2_inner: Avoid unnecessary use of underscore.js
...
This silences a bunch of you-dont-need-underscore-lodash ESLint
warnings.
2021-01-22 17:02:38 +00:00
Richard Hansen
51dc5b1627
ace2_inner: Delete dead code
2021-01-22 17:02:38 +00:00
translatewiki.net
e5836150cd
Localisation updates from https://translatewiki.net .
2021-01-21 15:09:02 +01:00
Richard Hansen
517fc88c54
eejs: Cache the compiled template, not the template string
2021-01-20 08:15:43 +00:00
Richard Hansen
4d2d439874
eejs: Simplify cache lookup logic
2021-01-20 08:15:43 +00:00
Richard Hansen
c8c3929058
eejs: Inline begin_capture
, end_capture
2021-01-20 08:15:43 +00:00
Richard Hansen
7d11d54323
eejs: Delete unused functions
2021-01-20 08:15:43 +00:00
Richard Hansen
351913c08e
eejs: Delete broken example
2021-01-20 08:15:43 +00:00
Richard Hansen
5987f75b0d
eejs: Unwrap unnecessarily wrapped line
2021-01-20 08:15:43 +00:00
Richard Hansen
ebc4956277
eejs: Fix straightforward ESLint errors
2021-01-19 19:59:25 +00:00
translatewiki.net
c89da1a9f2
Localisation updates from https://translatewiki.net .
2021-01-18 16:46:17 +01:00
John McLear
c0d9881a62
stats: add memoryUsageHeap value
2021-01-16 19:36:00 +00:00
Richard Hansen
4bda5272df
Revert "db: Capitalize Database
constructor"
...
I thought a PR adding capitalized `Database` landed in ueberdb2, but
apparently not.
This reverts commit 611d416d54
.
2021-01-15 18:05:39 -05:00
Richard Hansen
0ba833c632
db: Update ueberdb2 dependency
2021-01-15 22:37:18 +00:00
Richard Hansen
611d416d54
db: Capitalize Database
constructor
2021-01-15 22:37:18 +00:00
translatewiki.net
52c08794de
Localisation updates from https://translatewiki.net .
2021-01-14 15:44:58 +01:00
John McLear
2929ba9894
lint: cssmanager.js
2021-01-14 13:06:34 +00:00
John McLear
d9f3bb0e39
lint: colorutils.js
2021-01-14 13:06:34 +00:00
John McLear
1d57d4ee3f
lint: caretPosition linting
2021-01-14 13:06:34 +00:00
John McLear
aeab9cc0ad
lint: attributepool fix incorrect commit
2021-01-14 13:06:34 +00:00
John McLear
76744d9783
lint: AttributePool.js
2021-01-14 13:06:34 +00:00
John McLear
efc323cd71
Revert "lint: attributepool.js"
...
This reverts commit 33baaafbdeb4c0f82ec504738f5851f9ab5261a8.
2021-01-14 13:06:34 +00:00
John McLear
75ffe40c09
lint: attributepool.js
2021-01-14 13:06:34 +00:00
John McLear
46dc943101
lint: linestylefilter and rjquery.js
2021-01-14 13:06:34 +00:00
John McLear
c38c34bef4
linting: ace2_inner
...
* remove IE and add strict headers
* linting: kids are back, need to stop for today
* linting: farbtastic fix
* lint: more lint fixes
* more lint fixes
* linting: sub 100 errors
* comments where I need help
* ready to be helped :)
* small fixes
* fixes
* linting: all errors resolved
* linting: remove note to self
* fix as per nulli/wezz000li suggestion
* fix as per nulli/wezz000li suggestion
* resolve merge conflicts
* better use if to silence eslint
* Use `for..of` with `Object.keys` instead of `for..in`
* lint: move setSelection to before call
Co-authored-by: webzwo0i <webzwo0i@c3d2.de>
Co-authored-by: Richard Hansen <rhansen@rhansen.org>
2021-01-14 10:00:14 +00:00
Richard Hansen
edbe6d5387
Bump ueberDB to get speed improvements
2021-01-11 09:23:08 +00:00
John McLear
04962bfe39
update ueberdb to 1.1.7 ( #4633 )
2021-01-07 04:16:13 -05:00
translatewiki.net
68ca3fcdbd
Localisation updates from https://translatewiki.net .
2021-01-04 14:43:02 +01:00
translatewiki.net
6d626c90d3
Localisation updates from https://translatewiki.net .
2020-12-29 08:50:16 +01:00
webzwo0i
ca405c1685
send the test files with the correct content-type header
2020-12-27 23:40:35 +00:00
John McLear
38c9827161
Feature: Scroll to Line number based on Hash IE http://foo.com/p/bar#L10 will scroll to line 10. ( #4554 )
...
Includes test coverage
Co-authored-by: webzwo0i <webzwo0i@c3d2.de>
2020-12-26 22:05:08 +01:00
John McLear
e051f2f2f7
lint: scroll.js
2020-12-26 20:43:10 +00:00
webzwo0i
b760e699c6
remove explicitly setting process.env.DEBUG
2020-12-24 08:46:25 +00:00
Richard Hansen
9a15af78b6
Regenerate src/package-lock.json
with npm v6.14.9
...
This reverts the file back to lockfileVersion 1, which is used by the
LTS version of npm.
2020-12-23 16:58:30 -05:00
John McLear
d9262fccbd
bump version
2020-12-23 16:18:28 -05:00
John McLear
1a845773ee
css: loading position box
2020-12-23 16:18:28 -05:00
Richard Hansen
f31232dd20
socket.io: Disconnect clients when closing HTTP server
2020-12-23 16:18:28 -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
Richard Hansen
7949219179
Reformat src/ep.json
2020-12-23 16:18:28 -05: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
Richard Hansen
3e8c3e5789
express: Factor out common server shutdown logic
...
Also log when the HTTP server is about to be closed and when it is
done closing.
2020-12-23 16:18:28 -05:00
Richard Hansen
ff19181cd1
lint: Fix some straightforward ESLint errors
2020-12-23 16:18:28 -05:00
translatewiki.net
ac086c7925
Localisation updates from https://translatewiki.net .
2020-12-23 16:18:28 -05:00
webzwo0i
790ba72a9e
change scroll-behavior to auto
...
timeslider follow test: ensure there are so much lines in the pad view
below the changed line, so that the changed line will be the first
visible line
2020-12-23 16:18:28 -05:00
John McLear
996a2d86dd
lint: chat ( #4573 )
...
Co-authored-by: Richard Hansen <rhansen@rhansen.org>
2020-12-23 16:18:28 -05:00
John McLear
8bf463fb00
lint: broadcast_revisions ( #4571 )
...
Co-authored-by: Richard Hansen <rhansen@rhansen.org>
2020-12-23 16:17:59 -05:00
John McLear
4aef15cb11
lint: collab-client ( #4574 )
...
* lint: collab-client
* Undo incorrect lint fixes
These will be re-fixed in a future commit.
* Properly fix guard-for-in error
* Properly fix prefer-rest-params errors
* Move some code back to where it was
Moving the code makes it hard to review the diff.
* Delete DISCONNECT_REASON case
Someone reading the code won't understand what "used to handle
appLevelDisconnectReason" means until they dig through the Git
history. Given the server never sends messages of type
DISCONNECT_REASON anyway, just delete the case.
* Refine lint fixes
Co-authored-by: Richard Hansen <rhansen@rhansen.org>
2020-12-21 20:19:00 +00:00
Hossein Marzban
170a230c3a
Lint: timeslider ( #4580 )
...
Squashed changes from rhansen@rhansen.org:
* Move code back to where it was. (It's easier to review changes
when the code isn't moved. This causes some no-use-before-define
warnings to reappear, but those are just warnings.)
* Move eslint-disable comment to same line
* Use `window.clientvars` to resolve no-global-assign
* Undo changes that aren't about fixing lint errors
2020-12-20 18:24:17 -05:00
John McLear
bca60c8b17
lazydeveloper: remove console log
2020-12-20 10:56:19 +00:00
John McLear
e18b9d1844
timeslider/bugfix: timeslider wasn't updating when new pad contents was created - #4595
2020-12-20 10:45:16 +00: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
Hossein Marzban
34ee77993f
Lint: pluginfw tsort.js ( #4576 )
...
* lint: pluginfw tsort.js
* Don't comment out the `console.log()` call
Disabling the log message is out of scope for the pull request.
* Put const and let on separate lines
* Convert `tsort` from function to arrow function
ESLint doesn't complain about this due to a bug in
prefer-arrow/prefer-arrow-functions rule:
https://github.com/TristonJ/eslint-plugin-prefer-arrow/issues/24
Co-authored-by: Richard Hansen <rhansen@rhansen.org>
2020-12-20 06:18:49 +00:00
webzwo0i
a637920e55
add list-style:none for ul.indents in exported HTML ( #4586 )
...
* add list-style:none for ul.indents in exported HTML
* use list-style-type not list-style
2020-12-20 06:00:18 +00:00
Richard Hansen
b82bf5c726
Drop support for Internet Explorer
2020-12-19 19:13:31 +00:00
webzwo0i
c5cf7ab144
tests: Ignore head tag on import / improved contentcollector tests
...
* fix accidental write to global variable
properly show pending tests
log test name in suite
better log output for received/expected strings
* cc tests: enable second nestedOL test
* ignore the head tag on import
2020-12-18 09:37:37 +00:00
Richard Hansen
d9b7aa489d
pad import/export: Delete dead functions
2020-12-18 09:29:28 +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
794dfb1863
lint: Bump eslint-config-etherpad and install its new deps
2020-12-17 22:18:29 +00:00
translatewiki.net
c9db9500e5
Localisation updates from https://translatewiki.net .
2020-12-17 15:13:17 +01:00
Richard Hansen
f54dcbc766
lint: Re-run eslint --fix
2020-12-16 22:09:48 +00:00
Richard Hansen
fc234d0088
lint: Bump eslint
and eslint-config-etherpad
versions
2020-12-16 22:09:48 +00:00
Richard Hansen
af7cd13787
pad: Add a hook for the permission denied block
...
This makes it possible for the ep_readonly_guest plugin to add a login
button.
2020-12-16 19:39:52 +00:00
Richard Hansen
92b295193f
css: Apply font formatting to the text, not the high-level div
...
This makes it possible for plugins to add new items without them
rendering centered, at a ridiculous size, or at an awkward location.
2020-12-16 19:39:52 +00:00