Commit Graph

6772 Commits (269c6d09c579e993ced794d4d09c757e6c6f652d)

Author SHA1 Message Date
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
Richard Hansen f0a6236a0d Merge branch 'master' into develop 2021-02-15 12:47:47 -05:00
Richard Hansen 113df1f186 Merge branch 'develop' 2021-02-15 12:47:33 -05:00
John McLear c0f73e6672 bump version 2021-02-15 12:47:20 -05:00
John McLear 306e839bd8 docs: security notification 2021-02-15 12:45:31 -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 648e7c7342 docs: Mention improved import UX in `CHANGELOG.md` 2021-02-14 03:58:53 -05: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 13a0b0688f
docs: changelog update (#4776)
Co-authored-by: Richard Hansen <rhansen@rhansen.org>
2021-02-14 01:16:41 -05: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