Commit Graph

12835 Commits

Author SHA1 Message Date
Julian Lam
990ad6a11a Merge remote-tracking branch 'origin/master' into develop 2022-08-17 15:32:49 -04:00
Julian Lam
ec048a01ba fix: #10841, incorrect conditional in email interstitial partial 2022-08-17 15:32:36 -04:00
Barış Soner Uşaklı
aba420a3f3 feat: setting to show signatures only once in topics, closes #10071 2022-08-16 18:06:16 -04:00
Barış Soner Uşaklı
14c79763dd refactor: use group.slug on acp group urls closes #8277 2022-08-16 10:42:33 -04:00
Barış Soner Uşaklı
e06e526e54 fix: don't crash if post is undefined 2022-08-15 14:18:43 -04:00
Barış Soner Uşaklı
33458701c1 test: passport0.6 (#10638)
* test: passport0.6

* test: make logout async, fix lint

* test: keepSessionInfo flag

* revert: csrf load
2022-08-15 14:18:43 -04:00
Opliko
3975fa2e45 fix: return at least one in sizeCalculation (#10832)
if post content is empty post cache should still consider its size to be at least one. fixes #10831
2022-08-15 14:18:43 -04:00
Barış Soner Uşaklı
4a3e36a766 fix: don't crash if post is undefined 2022-08-14 20:18:18 -04:00
Opliko
a9bbb586fc feat: allow plugins to add to admin cache list (#10833)
* feat: allow plugins to add to admin cache list

resolves  #10820

plugins will have to use `filter:admin.cache.get` hook and just add their own cache to the object there.

* feat: add dump to ttlCache and expose properties

* feat: also expose properties under their current names

* feat: display TTL if set
2022-08-13 20:35:59 -04:00
Barış Soner Uşaklı
6b2a6f9006 test: passport0.6 (#10638)
* test: passport0.6

* test: make logout async, fix lint

* test: keepSessionInfo flag

* revert: csrf load
2022-08-13 20:24:42 -04:00
Opliko
15ca460c8f fix: return at least one in sizeCalculation (#10832)
if post content is empty post cache should still consider its size to be at least one. fixes #10831
2022-08-13 09:29:56 -04:00
Julian Lam
9b753d6d57 TTL Cache (#10816)
* refactor: move src/cacheCreate.js to src/cache/lru.js

* fix: call new library location for lru cache creator

* feat: add ttl cache

* fix: update upload throttler to use ttl cache instead of lru cache

* chore: add missing dependency

* fix: avoid pubsub conflicts

* fix: use get instead of peek, which is not available in ttl-cache
2022-08-10 15:26:07 -04:00
Julian Lam
c07d595662 Update to lru-cache@^7 (#10815)
* chore(deps): bump lru-cache from 6.0.0 to 7.13.1 in /install

Bumps [lru-cache](https://github.com/isaacs/node-lru-cache) from 6.0.0 to 7.13.1.
- [Release notes](https://github.com/isaacs/node-lru-cache/releases)
- [Changelog](https://github.com/isaacs/node-lru-cache/blob/main/CHANGELOG.md)
- [Commits](https://github.com/isaacs/node-lru-cache/compare/v6.0.0...v7.13.1)

---
updated-dependencies:
- dependency-name: lru-cache
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* fix(lru-cache): remove unneeded `length` params for cache creation, as `maxSize` was not used in those init calls, also renamed some methods to match new method names in lru-cache [breaking]

Added deprecation notices for old params

* fix: replace three direct calls to lru-cache with call to cacheCreate, moved cache creation call in uploads to run on first init as config is not populated at lib init

* test: move configs init above cache reset calls in databasemock

* move some more code above cache clear

* refactor: remove unused

* test: lru

* test: more debug

* test: on more test

* use await helpers.uploadFile

* fix: tests remove logs

* fix: acp cache page

* fix: add in one more guard again cache instantiation with `length` prop but no `maxSize` prop

* fix(deps): bump markdown

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Barış Soner Uşaklı <barisusakli@gmail.com>
2022-08-10 13:24:16 -04:00
Opliko
b3a37a7f35 feat: support packageManager property in package.json
resolves #10714
2022-08-08 17:23:32 -04:00
Julian Lam
38bf30c8ca fix: adapt to breaking change in commander 2022-08-08 17:17:38 -04:00
Julian Lam
d0255fc6a5 fix: move panel-offset setting code back to theme header 2022-08-08 16:02:27 -04:00
Julian Lam
c6782a2173 Merge remote-tracking branch 'origin/master' into develop 2022-08-05 14:40:47 -04:00
Julian Lam
9d27e90740 fix: don't require password challenge if no password is set in user account 2022-08-05 14:39:36 -04:00
Julian Lam
287f4c2c41 fix: do not throw if password passed into isPasswordCorrect is invalid, just return false 2022-08-05 14:39:36 -04:00
Julian Lam
7fcee42be9 feat: present a password challenge on email update flow 2022-08-05 14:39:36 -04:00
Barış Soner Uşaklı
7e8ad785f4 fix: don't crash if req.body.username is not string
Error: req.body.username.trim is not a function
File: authenticationController.login (/usr/src/app/src/controllers/authentication.js:247:40)
2022-08-05 08:11:32 -04:00
Barış Soner Uşaklı
55c5588a4b fix: don't crash if target/user is undefined
Error: TypeError: Cannot read properties of undefined (reading 'displayname')
File: Flags.notify (/usr/src/app/src/flags.js:812:89)
2022-08-05 08:11:11 -04:00
Julian Lam
9ee1afbb0f Merge branch 'master' into develop 2022-08-04 16:04:09 -04:00
Julian Lam
06f089afda test: fix user email tests 2022-08-04 16:02:16 -04:00
Barış Soner Uşaklı
d73f0f9ccb perf: make single db call 2022-08-04 15:51:24 -04:00
Julian Lam
e092bfeb46 Merge remote-tracking branch 'origin/master' into develop 2022-08-03 15:21:04 -04:00
Julian Lam
cba9047f67 fix: #10805, hide unconfirmed emails from user data retrieval methods 2022-08-03 12:36:11 -04:00
Julian Lam
3e062a7f29 fix: use different emoji on NodeBB Ready — again because procrastination 2022-08-03 12:10:08 -04:00
Barış Soner Uşaklı
cd438b328a fix: unnecessary escape 2022-07-30 19:57:48 -04:00
Barış Soner Uşaklı
f64a69132a Merge branch 'develop' of https://github.com/NodeBB/NodeBB into develop 2022-07-30 19:56:03 -04:00
Julian Lam
dc3a6a29bc fix: #10783, do not purge files without a timestamp prefix 2022-07-29 15:32:23 -04:00
Julian Lam
89173f17ca fix: #10798, logic error in COEP header; helmet config 2022-07-29 11:14:45 -04:00
Julian Lam
5176fb1544 feat: add emoji to startup logs, because procrastination. 2022-07-28 15:13:35 -04:00
Julian Lam
dcacd815a9 refactor: invert helmet configuration 2022-07-27 17:02:02 -04:00
Julian Lam
820bc994d8 feat: UI changes for ACP > Manage > Categories (#10782)
* Revert "Revert "feat: cross origin opener policy options (#10710)""

This reverts commit 46050ace1a.

* Revert "Revert "chore(i18n): fallback strings for new resources: nodebb.admin-settings-advanced""

This reverts commit 9f291c07d3.

* feat: closes #10719, don't trim children if category is marked section

* feat: fire hook to allow plugins to filter the pids returned in a user profile

/cc julianlam/nodebb-plugin-support-forum#14

* fix: use `user.hidePrivateData();` more consistently across user retrieval endpoints

* fix: better looking placeholder text for ACP search

* fix: bug where fallback to forum search was not working due to client-side error

* feat: allow plugins to toggle whether IPs are shown in the users CSV export

* feat: Allow defining active plugins in config (#10767)

* Revert "Revert "feat: cross origin opener policy options (#10710)""

This reverts commit 46050ace1a.

* Revert "Revert "chore(i18n): fallback strings for new resources: nodebb.admin-settings-advanced""

This reverts commit 9f291c07d3.

* feat: closes #10719, don't trim children if category is marked section

* feat: fire hook to allow plugins to filter the pids returned in a user profile

/cc julianlam/nodebb-plugin-support-forum#14

* fix: use `user.hidePrivateData();` more consistently across user retrieval endpoints

* feat: Allow defining active plugins in config

resolves #10766

* fix: assign the db result to files properly

* test: add tests with plugins in config

* feat: better theme change handling

* feat: add visual indication that plugins can't be activated

* test: correct hooks

* test: fix test definitions

* test: remove instead of resetting nconf to avoid affecting other tests

* test: ... I forgot how nconf worked

* fix: remove negation

* docs: improve wording of error message

* feat: reduce code duplication

* style: remove a redundant space

* fix: remove unused imports

* fix: use nconf instead of requiring config.json

* fix: await...

* fix: second missed await

* fix: move back from getActiveIds to getActive

* fix: use paths again?

* fix: typo

* fix: move require into the function

* fix: forgot to change back to getActive

* test: getActive returns only id

* test: accedently commented out some stuff

* feat: added note to top of plugins page if \!canChangeState

Co-authored-by: Julian Lam <julian@nodebb.org>
Co-authored-by: Barış Soner Uşaklı <barisusakli@gmail.com>

* feat: show an informative message when no plugins are found after filtering

fixes #10771

* Latest translations and fallbacks

* Latest translations and fallbacks

* chore(deps): bump ace-builds from 1.7.1 to 1.8.1 in /install

Bumps [ace-builds](https://github.com/ajaxorg/ace-builds) from 1.7.1 to 1.8.1.
- [Release notes](https://github.com/ajaxorg/ace-builds/releases)
- [Changelog](https://github.com/ajaxorg/ace-builds/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ajaxorg/ace-builds/compare/v1.7.1...v1.8.1)

---
updated-dependencies:
- dependency-name: ace-builds
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* fix: swap out icons in ACP > Manage > Categories to more intuitive ones, remove extra placeholder div

* fix: hide expando button if no subcategories; remove attempt at establishing common vars, increased spacing between categories in list

* fix: buggy expando state on category drag/drop

Co-authored-by: Barış Soner Uşaklı <barisusakli@gmail.com>
Co-authored-by: Opliko <opliko.reg@protonmail.com>
Co-authored-by: Misty Release Bot <deploy@nodebb.org>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-26 14:29:32 -04:00
Julian Lam
6840a7423b feat: show an informative message when no plugins are found after filtering
fixes #10771
2022-07-26 14:27:17 -04:00
Opliko
23cb67a112 feat: Allow defining active plugins in config (#10767)
* Revert "Revert "feat: cross origin opener policy options (#10710)""

This reverts commit 46050ace1a.

* Revert "Revert "chore(i18n): fallback strings for new resources: nodebb.admin-settings-advanced""

This reverts commit 9f291c07d3.

* feat: closes #10719, don't trim children if category is marked section

* feat: fire hook to allow plugins to filter the pids returned in a user profile

/cc julianlam/nodebb-plugin-support-forum#14

* fix: use `user.hidePrivateData();` more consistently across user retrieval endpoints

* feat: Allow defining active plugins in config

resolves #10766

* fix: assign the db result to files properly

* test: add tests with plugins in config

* feat: better theme change handling

* feat: add visual indication that plugins can't be activated

* test: correct hooks

* test: fix test definitions

* test: remove instead of resetting nconf to avoid affecting other tests

* test: ... I forgot how nconf worked

* fix: remove negation

* docs: improve wording of error message

* feat: reduce code duplication

* style: remove a redundant space

* fix: remove unused imports

* fix: use nconf instead of requiring config.json

* fix: await...

* fix: second missed await

* fix: move back from getActiveIds to getActive

* fix: use paths again?

* fix: typo

* fix: move require into the function

* fix: forgot to change back to getActive

* test: getActive returns only id

* test: accedently commented out some stuff

* feat: added note to top of plugins page if \!canChangeState

Co-authored-by: Julian Lam <julian@nodebb.org>
Co-authored-by: Barış Soner Uşaklı <barisusakli@gmail.com>
2022-07-26 14:27:17 -04:00
Julian Lam
a6af47da02 feat: allow plugins to toggle whether IPs are shown in the users CSV export 2022-07-26 14:27:17 -04:00
Julian Lam
1b9c68196f fix: better looking placeholder text for ACP search 2022-07-26 14:27:17 -04:00
Julian Lam
0529f2fb5d fix: use user.hidePrivateData(); more consistently across user retrieval endpoints 2022-07-26 14:27:17 -04:00
Julian Lam
c26be43ac5 feat: fire hook to allow plugins to filter the pids returned in a user profile
/cc julianlam/nodebb-plugin-support-forum#14
2022-07-26 14:27:17 -04:00
Barış Soner Uşaklı
7e80cc1033 feat: closes #10719, don't trim children if category is marked section 2022-07-26 14:27:17 -04:00
Julian Lam
ad072c03d1 Revert "Revert "feat: cross origin opener policy options (#10710)""
This reverts commit 46050ace1a.
2022-07-26 14:27:17 -04:00
Tong Ho
bbc7f2afba fix: cannot turn off all networks 2022-07-25 10:39:55 -04:00
Tong Ho
2e088a8ef0 fix: cannot setting networks for sharing posts 2022-07-25 10:39:55 -04:00
Julian Lam
c93bd0105e fix: expire email validation tokens on password change 2022-07-20 17:02:39 -04:00
Julian Lam
0d58e8a6af fix: remove extraneous console.log 2022-07-15 14:57:37 -04:00
Julian Lam
3c41ae04cd fix: #10733, extraneous apostrophes in plugin upgrader 2022-07-07 15:10:52 -04:00
Julian Lam
60114219c1 fix: get version from install/package.json instead 2022-07-07 15:07:03 -04:00
Julian Lam
8d701ec3e2 fix: #10739, always re-add theme to active plugins, on theme set 2022-07-05 13:15:22 -04:00