Commit Graph

10956 Commits (2eb7c2842a070b6fff96108fe03815b4076868ed)

Author SHA1 Message Date
Barış Soner Uşaklı 4658121a7d fix: don't crash if content is undefined
Barış Soner Uşaklı ff3c343532 feat: remove js-enabled
Barış Soner Uşaklı a3c8d45626 fix: crash if csrfToken does not exist
Barış Soner Uşaklı a46adb3fd5 fix: more tests
Barış Soner Uşaklı 72c60d19c2 fix: tests
Barış Soner Uşaklı 2a5f8ab27e feat: dont load all subscribers at once
increase batch to 500
Barış Soner Uşaklı 23a9a334cd feat: short more info
Barış Soner Uşaklı 2485a55092 feat: , allow editing title before posting from queue
Barış Soner Uşaklı 1e7397b1b8 feat: allow searching categories in ACP
psychobunny 06143ca7d7 feat: added quick link to edit privileges on the category edit page
Barış Soner Uşaklı 3653151143 fix: , dont allow moving topics if not moderator of target category
Julian Lam e3e55f25d0 refactor: flag sanity checks, +feat: flag limits
- Added new config flag:limitPerTarget, to disallow flags after an item has
  already been flagged x times (default 0, or infinite)
- New zset flags:byTarget, score is the number of times a flag has been made
  against that item
- "already-flagged" translation key removed, now "post-already-flagged" or
  "user-already-flagged" -- this fixed bug where flagging a user you've already
  flagged would tell you you've already flagged this post already.
- Refactored Flags.canFlag to throw errors only, instead of returning boolean
- Updated ACP form inputs for reputation settings page to be more bootstrappy
- +1 upgrade script
Julian Lam 1441720962 feat: logic for flag note editing,
Julian Lam f85a45c722 feat: logic for flag note deletion,
Barış Soner Uşaklı 00d39fb32c feat: , export groups members as csv
Barış Soner Uşaklı b3a88331bf fix:
Barış Soner Uşaklı 393f19b461 feat: pass connection options to socket.io-adapter-mongo
Barış Soner Uşaklı 3dcf538773 feat: , allow wildcard search for uid/email
Barış Soner Uşaklı 46a6686300 fix: category search in selector
Barış Soner Uşaklı 73ddf1cb98 fix: groups.updateCover
Barış Soner Uşaklı c513b88dff feat: , daily downvote limits
Barış Soner Uşaklı 658dd03b03
feat: add tools to recent/unread ()
* feat: add tools to recent/unread

* fix: open api spec

* fix: more api spec
Barış Soner Uşaklı c2ca02dfc7 fix:
make isPrimary and isCluster always booleans
they were strings when using ./nodebb start and boolean if they were in config.json and started with node app.js
Julian Lam 4f51838df8 feat: fire new hooks on chat message editing
Barış Soner Uşaklı 7b04d8970d fix: show stack properly
Julian Lam 9a6b87d261 fix: editing chat messages does not go through content sanity checks
Barış Soner Uşaklı d6c619cf1a fix: don't show blocked users under nested replies
Barış Soner Uşaklı b60e1cbf50 fix: , action:topic.changeOwner, action:post.changeOwner
Barış Soner Uşaklı 87dd6c83eb fix: tests
Barış Soner Uşaklı 746222d6c6 fix: handle scan/zscan returning duplicate elements on redis
increase count on redis zscan
Barış Soner Uşaklı ac6b571ed5 fix: dont allow searching by email/ip if not privileged
Barış Soner Uşaklı fef04fcf6b fix: missing backgroundImage
Barış Soner Uşaklı 02ac44cc5a fix: dont allow searching by ip/banned/flagged for regular users
Barış Soner Uşaklı 057b783df7 feat: use covered query
Julian Lam da29b947bf feat: add js-enabled.css to list of preloaded css files
Barış Soner Uşaklı e95cd28f6f
Zscan ()
* feat: zscan

* fix: mongodb tests

* feat: scan, ip search starts with
Barış Soner Uşaklı 723fe8e8e0
feat: zscan ()
* feat: zscan

* fix: mongodb tests
Barış Soner Uşaklı 59a2ace6f7 fix: only add blocksCount for self and admins
Barış Soner Uşaklı fd20e5c62c fix: tests
Barış Soner Uşaklı bd228d5ee7 feat: fix blocksCount not being returned on user profile
add hook action:user.blocks.toggle
Barış Soner Uşaklı eb9704f85e feat: , next/prev link tags on /unread /recent
Barış Soner Uşaklı fd400a008d fix: don't show in unreplied if score is null
Barış Soner Uşaklı e09ab3dc19 feat: closes , allow configuring max topic count
Barış Soner Uşaklı 0d0b951380 fix: lint
Barış Soner Uşaklı 37b6b8fd48 fix: upgrade script to unescape navigation titles
Barış Soner Uşaklı 2355d9d5dd fix: escape navigation item fields, theme:id, category fields
Barış Soner Uşaklı 023de94ef8 fix: show controls @julianlam
Barış Soner Uşaklı e53a18f219 fix: ,
Barış Soner Uşaklı bffb830d87 feat: add missing translation key
Barış Soner Uşaklı 0d112b3605 refactor: make code climate happier?
Barış Soner Uşaklı c718b7293e feat: , min/max tags per category
Barış Soner Uşaklı 00d8ce2663 fix: only allow valid uids
Barış Soner Uşaklı 8383992dcc feat: move export functions into child processes
Barış Soner Uşaklı 48b41debe6
fix: vulnerability in cover and admin uploads ()
* fix: vulnerability in cover and admin uploads

* fix: remove old test

* fix: update tests
Barış Soner Uşaklı e80379dc0e feat: display stack trace on winston.error
Barış Soner Uşaklı af790e3f5e refactor: shorter code
Barış Soner Uşaklı e8f0da6e42 refactor: shorter code
Barış Soner Uşaklı 79a7f89235 Merge branch 'master' of https://github.com/NodeBB/NodeBB
Barış Soner Uşaklı 2bcf7f72d2 fix: follower count going out of sync with real follower count
Barış Soner Uşaklı bef37e27cb
fix: test lock for user create ()
* fix: test lock for user create

* fix: redis hdel with undefined

* feat: add test for undefined key in deleteObjectFields
Barış Soner Uşaklı f0526bff9f fix: add mising timestamp
Barış Soner Uşaklı a680a95e73 feat: add filter:user.getFields to match topic/posts
Manuel Valle 056f85f864
Topic hooks extension ()
* Update data.js with new hook

Implemented new 'filter:topic.getFields' hook as in posts

* Update data.js

* Update data.js
Julian Lam 35a06a8419 feat: breadcrumbs for ip-blacklist/post queue/flags
Julian Lam f909ed2541 feat: show editor in post diffs if available
Julian Lam b3115ea813 fix:
Julian Lam 58b3d608fc feat: allow post diffs to be restored,
Barış Soner Uşaklı 7ed1a0140a fix: ,
switch to @nodebb/socket.io-adapter-mongo
Barış Soner Uşaklı 18d892398f fix: add timestamp to initial username history
Barış Soner Uşaklı 53a9517d54 fix: crash in export posts if post content is undefined
Barış Soner Uşaklı 0041c02465 fix: messaging unread
dont mark chat room unread and then read right away for the user sending the message
Barış Soner Uşaklı 066b442e18 Merge branch 'master' of https://github.com/NodeBB/NodeBB
Barış Soner Uşaklı bb3aa54006 feat: merge changes
allow selecting main topic to merge into
allow specifying a new title for merge topic
upon merge go to correct topic
new tests for merging with options
Barış Soner Uşaklı a024cc1344
fix: whitespace
Barış Soner Uşaklı 0595e71078
fix: typo
Barış Soner Uşaklı 89b010249d
fix: , clear group member cache when group is renamed
Barış Soner Uşaklı 8627bee541 fix: , use backgroundImage everywhere
Julian Lam 4acb3fb210 feat: expose global and admin privs to flags detail page
Barış Soner Uşaklı 3be4d5f7d5 feat: redirect /me to user profile
Julian Lam daeceb45bd fix: missing space in ACP menu dropdown
Julian Lam 942cc4b132 fix:
Julian Lam 67aca822e6 feat: account content deletion, closes
Julian Lam a82e9bd7f6
feat: privileges for Admin Control Panel ()
* feat: acp privileges (WIP)

* fix: restore global privilege hooks

* refactor: using cid 0 in admin privs

* fix: no need for zebrastripe-reset

* feat: manage:categories privilege WIP

* feat: renamed prefix to admin:, settigns and dashboard privs

* fix: nofocus on acp privs group find modal

* refactor: privileges.x.get() to not used hardcoded privs

* fix: crash if unable to get latest version

* feat: setting acp priv

* Revert "fix: crash if unable to get latest version"

This reverts commit afdb235f48eb0072d88de45f3a1e0151281095b3.

* feat: user/privilege acp privs

* fix: category selector in manage/privileges

* fix: guests potentially becoming admins

* fix: bug in setting admin privs

* fix: some last minute things + api docs

* fix: some more last minute fixes
Barış Soner Uşaklı 30cc83c033 fix: , revert event delete
Barış Soner Uşaklı fd6bf0c927 Merge branch 'master' of https://github.com/NodeBB/NodeBB
Julian Lam 260a482caa fix: remove duplicate link to manage/tags in settings/tags
Barış Soner Uşaklı 3a078f59ec fix: tests
Barış Soner Uşaklı 1b5d5425b4 fix: handle search tag permission as well
Barış Soner Uşaklı 2100a03c1a refactor: change name to privileges to match other apis
cryptoethic f6b92d241a
fix: checking correct permissions for user search ()
* fix: checking correct permissions for user search

* fix: missing permissions porperty in openapi /api/search
Barış Soner Uşaklı 842b8abb84
feat: add buildHeaderAsync ()
* feat: add buildHeaderAsync

make helphers.notAllowed async

* fix: remove csrf from buildHeader

* fix: remove unused method, use middleware

* fix: /post/pid redirect doesn't need buildHeader

use buildHeaderAsync
Barış Soner Uşaklı dcb85ee7a1
()
* feat: wip

* feat: wrap middlewares

* feat: middleware errors

* feat: more middleware changes

* fix: remove unused async

* fix: prevent version errors from blocking acp render

* feat: wrap more middlewares
Julian Lam 023942da7d
refactor: making rendering of header and footer async functions
* refactor: make middleware.admin.renderHeader async

* refactor: making rendering of header and footer async functions

* fix: use app.renderAsync instead of promifying it
Julian Lam 922d49be0b fix(style): switch..case
Barış Soner Uşaklı 5a2b515431 feat: , remove user posts from queue if user is deleted
Barış Soner Uşaklı e603ebc0c6 fix: , let admins send validation emails without timeout
Barış Soner Uşaklı 2c9e865763 fix: retry failed setObject calls
Julian Lam 0633ad3277 fix: acp menu items
- Shuffled items in settings
- Moved post-queue and ip-blacklist to front-end
- Removed Settings > Sockets, merged with Settings > Advanced
Julian Lam a83f4259e8 fix: re-jigged tags acp pages
Julian Lam a51fff8bd1
refactor: remove general menu from ACP ()
* refactor: remove general menu from ACP

* fix: incorrect translation keys, fixed tests
Barış Soner Uşaklı 5781a2dc65
feat: fix session mismatch errors by clearing cookie on logout ()
* feat: fix session mismatch errors by clearing cookie on logout

* feat: remove app.upateHeader

ported from 2.0

* feat: handle if user doesn't click button and just refreshes page
Barış Soner Uşaklı 7d484fc0ad refactor: use getSortedSetMembers
Barış Soner Uşaklı 0009f54e6e feat: add getSortedSetMembers
Barış Soner Uşaklı 2727f472ed feat: add the data from page into filter:middleware.renderHeader
Barış Soner Uşaklı ec5582b53c
feat: add privilege give/rescind hooks ()
* feat: add privilege give/rescind hooks

action:privileges.categories.give/rescind
action:privileges.global.give/rescind

breaking change, privileges.categories.give/rescind and privileges.global.give/rescind use full privilege name for groups ie `groups:find` instead of `find`

* fix: tests, privileges renamed
Julian Lam cf00cda07c refactor: src/flags.js because codeclimate
Julian Lam 8d995d1eb6 refactor: flags detail page
- Show account moderation history
- Ban and delete quick actions

Squashed commit of the following:

commit 0e782e65f4d48ae814708e510ec9d01bcdd914e0
Author: Julian Lam <julian@nodebb.org>
Date:   Tue May 26 20:24:53 2020 -0400

    fix(deps): use persona 10.1.41/vanilla 11.1.17

commit 369e073d3c3189d8ce181eb3d573489cbe54d4fc
Author: Julian Lam <julian@nodebb.org>
Date:   Tue May 26 20:23:24 2020 -0400

    fix: allow ban and delete exported methods to have cbs

commit b83a086ea31a77ec82d161306c0b9bc115cb2a3a
Merge: 525aae1ea 256ee45d3
Author: Julian Lam <julian@nodebb.org>
Date:   Tue May 26 08:54:25 2020 -0400

    Merge remote-tracking branch 'origin/master' into flags-improvements

commit 525aae1ea2e5d0103028a0f0c8dde05f172d088e
Author: Julian Lam <julian@nodebb.org>
Date:   Tue May 26 08:53:39 2020 -0400

    feat: integrate ban history and username changes to flag history list

commit 3e68ad28ba266f4c8620a676aa7f463f0a9d1df7
Author: Julian Lam <julian@nodebb.org>
Date:   Mon May 25 18:22:53 2020 -0400

    feat: allow ban and deletion from flag details page

commit a559ea1d8e8883385c2876868d855a0b93516c54
Author: Julian Lam <julian@nodebb.org>
Date:   Mon May 25 18:22:00 2020 -0400

    feat: export banAccount and deleteAccount methods from accounts module
Barış Soner Uşaklı f3afba6156 feat: filter followed tids by category
Barış Soner Uşaklı 1b9e8928eb feat: use getSortedSetsMembers to load followed tids
Barış Soner Uşaklı a015af4a41 feat: add batch size to cursors
Barış Soner Uşaklı 0a31e3e6b0 fix: , dont load moderators separately for each category
Barış Soner Uşaklı 11bb6abb51 fix: show stack trace on startup errors
Barış Soner Uşaklı 9600ede579
feat: up cache size
Barış Soner Uşaklı 7f24200c73 feat: add folder to filter:uploadImage and filter:uploadFile
Barış Soner Uşaklı 3ec05eeaf8 fix: user faster method if sorting by smallest set
Barış Soner Uşaklı 4ee3543ea4 feat: tweak intersection code, add tests
Julian Lam 6f504c4142
Remove allowFileUploads ACP option ()
* feat: allow awaitable upgrade scripts

* feat: allowFileUploads removal upgrade script

* refactor: remove unnecessary ACP option `allowFileUploads`

* fix: updated upgrade script template to not use callback arg

* fix: upgrade script as per @baris

* fix: add missing await

* fix: add missing await
Barış Soner Uşaklı e5228179c1
Mongo intersection ()
* feat: intersection without aggregation

* feat: intersection

* feat: remove debug code
Julian Lam e327d1247e Revert "fix: invalid session warning if server-side session destroyed"
This reverts commit 526b3cd9ec.
Barış Soner Uşaklı cb662e15ce feat: improve grunt restart/rebuild speed
Barış Soner Uşaklı 4263efa091 feat: don't overwrite req.query.lang if it exists
Barış Soner Uşaklı 12c6bc2e07 feat: convert queries so they used indices directly
Julian Lam ae2db423ee feat: cookie SameSite property
More information:
https://tools.ietf.org/html/draft-ietf-httpbis-cookie-same-site-00#section-4.1.1
https://web.dev/samesite-cookies-explained/
Barış Soner Uşaklı 7a801abade fix: tests on redis
Barış Soner Uşaklı 8bf980cb63 fix: tests, handle no sessions
Barış Soner Uşaklı a0d76ff0a6 fix: , clean expired sessions on login and get
Barış Soner Uşaklı 2587112f9d feat: if only one value is passed used faster function
Barış Soner Uşaklı 81e33b9391 fix:
Julian Lam 526b3cd9ec fix: invalid session warning if server-side session destroyed
Resolved regression caused by 5a0c7c1497
Barış Soner Uşaklı 5fd81c5c04 fix: check privileges before exporting post/topic data
Barış Soner Uşaklı f0323b6cfa feat: closes , add more data to export profile
Barış Soner Uşaklı 1d3fa3bc4e feat: throw error if uid is missing for update
Barış Soner Uşaklı dfae664e29 fix: exporting posts
Barış Soner Uşaklı bdda022238 fix: undefined uid when downloading posts
Barış Soner Uşaklı 1ba6929cb3 fix: , fix allowUserHomePage value
was always sending 1 even if allowUserHomePage was disabled in acp
Barış Soner Uşaklı 0e58fa33eb feat: match hook property to topic property
Barış Soner Uşaklı bfad457275 feat: add methods for adding/removing tags from topics
Barış Soner Uşaklı e20ad5c56e fix: dont crash if topic is null
Barış Soner Uşaklı c47a1c4df4 fix: convert cids to string for comparison
Barış Soner Uşaklı 97c086aba9 fix: missing await
Barış Soner Uşaklı 337be368eb fix: category selector disabled categories
Barış Soner Uşaklı a73c755b05 feat: closes , edit post notif for watched topic posts
Barış Soner Uşaklı edf9fe3b7f feat: add null tests for sorted sets
Barış Soner Uşaklı 6a5e86dc66 fix: , don't use null values
Barış Soner Uşaklı aad0880f7c feat: add filter:categories.getRecentTopicReplies
pass req.query to getRecentTopicReplies
Barış Soner Uşaklı 7e42988489 refactor: shorter function
Opliko c4545381d7
feat: Add hooks for user blocks ()
* Add hooks for user blocks

* change naming

* Fix the filter...

fixes 
Barış Soner Uşaklı 7d08184372 fix: winston showing json object
Barış Soner Uşaklı 0431d75f0d fix: , uids.length is different than topics.length
Julian Lam fcb81cb8ca fix: guest handles shown in category.tpl
Barış Soner Uşaklı 16a98eaf50 fix: only add to set if numRecentReplies>0
Barış Soner Uşaklı b25b51bd97 feat: add action:post.updatePostVoteCount
Barış Soner Uşaklı 6c59683b16 refactor: change to action:categories.updateRecentTid
Barış Soner Uşaklı ecd622fdf5 fix: failing tests @julianlam
Barış Soner Uşaklı 51933c1fcb feat: add filter:categories.updateRecentTid
Barış Soner Uşaklı 478ed6c16f refactor: match core field name pinned
Julian Lam 0053e779e8 feat: response:router.page, dep. filter variant
Barış Soner Uşaklı 9839346ec3 fix: , if there are no filters go to ?reset=1
dont count ?page=1 as a filter
Barış Soner Uşaklı 5ebcdb1806 fix: , fix users:flags as well
Barış Soner Uşaklı 4f1128fd2b fix: add missing await
Barış Soner Uşaklı 9d153fd388 fix: , dont readd user after deletion
don't add user uid back to users:* sorted sets if they are deleted
upgrade script to fix users:* sorted sets
Barış Soner Uşaklı 4d6b2ec3ce fix: missing await
Barış Soner Uşaklı 0391856d7d fix: , rescind notif when its resolved/rejected
Barış Soner Uşaklı 0ca84bd9f4 fix: , parse ToS on register
rewrite intersitials to async/await
Barış Soner Uşaklı 0c7c70edaf fix: crash in topic controller
psychobunny fe03effe7d Revert "fix: crash when res.locals.linkTags is undefined"
This reverts commit 7cab2b0fea.
Andrew Rodrigues 7cab2b0fea
fix: crash when res.locals.linkTags is undefined
Barış Soner Uşaklı e80b81010c fix: user link in digest email
Julian Lam 5a1c6ee7ed fix: response hook logic
After some more thought, a response hook should be checking for
whether headers are sent, and executing (or not executing) the
default logic in that case.

Before, we were relying on hooks to call data.next() to continue
execution, but it makes more sense to have the listener either
send a response or not, and handle the behaviour afterwards.
Julian Lam ccc6118d30
Testing suite integration for openapi spec ()
* feat: testing suite integration for openapi spec

The testing suite now takes the openapi spec into account. It will
check each route defined, make a call to it, and compare the
response with the defined schema. Any mismatches will cause the
test to fail.

* fix(openapi): removed debug stuff from tests

* fix(openapi): fixed some tests

* fix(openapi): added additional check to tests, test fixes

* fix(openapi): better tests, fixed spec errors

* fix(openapi): bad conditional in test

* fix: oops

* fix(openapi): more tests fixing

* fix(openapi): more tests

* fix(openapi): fix some more tests

* fix: verbose'd an info log

* fix: topic pagination route returns schema-optimized pagination block

* fix(openapi): more test/spec fixes

* fix(openapi): accidentally sending in authenticated jar for anon routes

* fix(openapi): more test/spec fixes

* fix(openapi): more spec fixes

* fix: timestampReadable Invalid Date

* fix(openapi): more tests... almost there

* fix(openapi): more tests fixing

* fix(openapi): finally all tests passing

* fix(openapi): added reverse test to compare response to spec

... and fixed all the tests that broke

* fix: remove tests related to group covers, as route is gone

* fix(openapi): broken test on travis

* fix(openapi): broken test on travis

* fix(openapi): broken test on travis

* fix(openapi): object cache is not present for psql

* fix: tests

Co-authored-by: Barış Soner Uşaklı <barisusakli@gmail.com>
Barış Soner Uşaklı 4eafe0f057 fix: , return array of topics from hook
Opliko 6e5ebb6184
feat: manifest.json improvements from ()
* feat: manifest.json improvements from 

* Fix short title placeholder

* use lowercase letters for hex colors
Barış Soner Uşaklı 153456278b feat: show error if json is invalid
Julian Lam ef52461fb6 fix: remove dead picture upload code
Julian Lam 5bcaf71501 fix: path.resolve to logs file
Barış Soner Uşaklı c7ea84a2ae fix: wrong data returned in available.groups
Peter Jaszkowiak e68156e1f2
fix(deps): bump dependencies ()
* fix(deps): bump dependencies

* fix(deps): commander@5

* fix(deps): use @nodebb/mubsub
Julian Lam f2f6fbf15a fix: , unresolvable session mismatch on register cancel
Jonson Petard e6a1741c2e
Support package manager: cnpm and pnpm ()
* feat: support pnpm, cnpm

* feat: store supportedPackageManager in default package.json

* feat: store supportedPackageManager in src/cli/package-install.js

Co-authored-by: a632079 <a632079@qq.com>
hb90dev 3ce885fff2
fixes sitemap base url issue when using with subfolder ()
* fixes sitemap base url issue when using with subfolder

* fixes sitemap base url issue when using with subfolder

* uses directly relative path

* removes prefix variable
Barış Soner Uşaklı d77036dbd1 fix: , don't send move notifications for deleted posts/topics
Julian Lam 1136a369f3 feat: local redoc view on development mode only
Julian Lam c82a263788 Revert "fix: override ACAO header for read API spec file"
This reverts commit 240d90919b.
Julian Lam 240d90919b fix: override ACAO header for read API spec file
Barış Soner Uşaklı 59cf0e80d2 fix: throw error if topic does not exist
Barış Soner Uşaklı e93578b81d fix: hookname
Barış Soner Uşaklı 0d1b5a7fb1 fix: , add hook getUserDataByUserSlug
psychobunny 15d6975e96 fix: ignore case for group details route
Barış Soner Uşaklı 740e598a5d fix: lint
Barış Soner Uşaklı 8e23dec84b fix: lint
Barış Soner Uşaklı 00e299e93e feat: closes , add targetUid to action:password.change
Barış Soner Uşaklı 23571224b5 feat: add parent cids to body class
Barış Soner Uşaklı 071506eb7d fix: invite properly
Barış Soner Uşaklı 8f4b99a41c fix: admins not seeing invite button
Barış Soner Uşaklı 0b5fac75b0 fix: , add missing lang key
Julian Lam 93acd13999 fix: first message in chat has false `newSet`
Barış Soner Uşaklı d080c7b04c feat: add 2 hooks for modifying privileges
Barış Soner Uşaklı f07f4f8e1a fix: , filter non-existing users in search by uid
psychobunny 266061c31a fix: notification bodyShort truncated if there is a comma in topic title
Julian Lam 1efb238a9a refactor: getUsersCSV to use batch lib