1043 Commits (df8ea4bad3af3561703c2948e06114af04a0c7af)

Author SHA1 Message Date
Julian Lam 3bcd1f1438 fix: email validation flow, so that it actually works, fixed event logging bug, new email verification template 4 years ago
Julian Lam caf8968791 fix: accidental early return in confirmByCode, tests, race condition
A race condition caused mongo/psql tests to fail.
4 years ago
gasoved a917210c5b feat: invites no longer require email 4 years ago
Julian Lam 81611ae1c4 fix(emails): broken test for api/user/email/:email
+ fixed broken tests due to unexpected behaviour for email confirmation
4 years ago
Julian Lam c4e3362bd3 feat(emails): restore ability for admins to edit a user's email address [breaking]
The edited user's email will be automatically confirmed
4 years ago
Julian Lam e726048e0c fix(emails): don't automatically associate email during user creation if passed in at registration 4 years ago
Julian Lam 087e6020e4 refactor(email): validation checking methods, +tests fix 4 years ago
Julian Lam 69c96dd23c refactor(emails): more work in update email interstitial, interstitial skipping, email change on confirmation, deprecation of requireEmailConfirmation 4 years ago
Julian Lam f365bc4600 refactor(emails): interstitial for adding/updating email 4 years ago
gasoved 97c8569a79 fix: hide private user data in api/v3/users/[uid] 4 years ago
Barış Soner Uşaklı 1bf263c4a2
9622 (#9625)
* fix: #9622

dont allow regular user to remove system tags

* refactor: add guest/spider check to isPrivileged

string/trim tag
4 years ago
gasoved 8168c6c407
fix: purge uploaded images accordingly #9606 (#9611)
* fix: purge uploaded images accordingly

* fix: tests

* fix: relative paths
4 years ago
Julian Lam 5c42b3eab0 test: fixed broken tests from #9605, removed token clean on token usage as it is superceded by token clean on generation (+ associated test) 4 years ago
Julian Lam 229f96f872 fix: #9605, expire all active reset tokens for a uid if that uid generates a new one 4 years ago
Barış Soner Uşaklı 8ea58432c9 feat: show ip on acp manage users
update url on search
show matching ip when searching by ip
add ip to export csv
4 years ago
Barış Soner Uşaklı ca72aa93d7
Locks bug failing test (#9595)
* test: failing test for issue

* fix: #9593, don't lock if email is identical to username

* fix: lock calls after first call

* fix: add back email check

* test: remove invalid test

Co-authored-by: Julian Lam <julian@nodebb.org>
4 years ago
Barış Soner Uşaklı 4afca6900b feat: add filter:user.getWatchedCategories 4 years ago
Barış Soner Uşaklı 285aa36556 feat: allow exists methods to work with arrays and single id 4 years ago
gasoved 077330b764
feat: scheduled topics (#9399)
* feat: scheduled topics

* refactor: linting fixes

* fix: tests

* fix(test): race condition

* fix: make a single request
4 years ago
Barış Soner Uşaklı 3aa26c4df2 fix: #9339, only log email errors once per digest, notification push
show notice in acp
4 years ago
Julian Lam bfd512b99b feat: expose username validation logic to user lib, new hook `filter:username.check` 4 years ago
Barış Soner Uşaklı 0af9d26fe5 feat: change uploadCroppedPicture to use updateProfile as well 4 years ago
Barış Soner Uşaklı a598abcd8e feat: use updateProfile for picture change
so it triggers action:user:updateProfile
4 years ago
Barış Soner Uşaklı 02f08111cf feat: keep notifs for one month, load 50 notifications instead of 30 4 years ago
Julian Lam f561799f74 refactor: abstract out some client side dashboard code into modules, analytics subpages for users, topics, and logins 4 years ago
Julian Lam 079a13d41a feat: new hooks for notifications get/getCount 4 years ago
Julian Lam dbe5f7027b fix: wrong call to sortedSetAdd 4 years ago
Julian Lam 16d3c45782 feat: report login statistics from analytics data, instead of its own zset 4 years ago
Julian Lam 9a9f366d3b feat: track login sessions for admin dashboard reporting 4 years ago
Julian Lam d3a9e76ae2 test(user): added additional tests for icon background colour 4 years ago
Julian Lam 955021247e feat(user): icon background selector in change picture modal 4 years ago
Julian Lam fbccf6e22f refactor(user): all plugins to change list of icon background colours
One notable change is line 200, where a conditional was changed. The conditional used to check for `user.hasOwnProperty('picture')` and was added so that icons would only be included in the response if the picture was requested. This doesn't seem to apply as picture could be set regardless (see default avatar logic above), so I explicitly check `requestedFields` now.
4 years ago
Julian Lam cc275e1016 Revert "feat: newsletter opt-in/out in UCP, closes #21"
This reverts commit 3c7cd9a6c4.
4 years ago
Julian Lam 3c7cd9a6c4 feat: newsletter opt-in/out in UCP, closes #21 4 years ago
Barış Soner Uşaklı c61cc37bba fix: typo 4 years ago
Barış Soner Uşaklı cf4002bcc9 perf: cache base_url 4 years ago
Barış Soner Uşaklı 5ce2820799 perf: single call to get digest topics, dont send duplicate topics 4 years ago
Barış Soner Uşaklı 90d5c9da44 perf: single db call to add all uids 4 years ago
Barış Soner Uşaklı 0185ea1b4f perf: make digests a little bit faster
and use batch.processArray
dont load data for users who have no email or have not confirmed their emails
4 years ago
Peter Jaszkowiak cc9d6fd08b chore: eslint max-len 4 years ago
Peter Jaszkowiak 5c2f0f0557 chore: eslint no-restricted-syntax 4 years ago
Peter Jaszkowiak 115d19e289 chore: eslint prefer-rest-params, prefer-spread 4 years ago
Peter Jaszkowiak 23f212a4c0 chore: eslint prefer-destructuring 4 years ago
Peter Jaszkowiak 62869bae3d chore: eslint function-paren-newline 4 years ago
Peter Jaszkowiak dab3b23575 chore: eslint no-var, vars-on-top 4 years ago
Peter Jaszkowiak b56d9e12b5 chore: eslint prefer-arrow-callback 4 years ago
Peter Jaszkowiak 707b55b6a5 chore: eslint prefer-template 4 years ago
Peter Jaszkowiak 4ee0f1459d chore: eslint import/newline-after-import 4 years ago
Barış Soner Uşaklı 47299ea587
Categories refactor (#9257)
* feat: wip categories pagination

* feat: add subCategoriesPerPage setting

* feat: add load more sub categories button to category page

* fix: openapi spec

* feat: show sub categories left on category page

hide button when no more categories left

* breaking: rename categories to allCategories on /search

categories contains the search results

* fix: spec

* refactor: remove cidsPerPage

* fix: tests

* feat: use component for subcategories

* fix: prevent negative subCategoriesLeft

* feat: new category filter/search WIP

* feat: remove categories from /tag

* fix: dont load all categories when showing move modal

* feat: allow adding custom categories to list

* breaking: dont load entire category tree on post queue

removed unused code
add hooks to filter/selector
add options to filter/selector

* feat: make selector modal work again

* feat: replace old search module

* fix: topic move selector

* feat: dont load all categories on create category modal

* fix: fix more categorySelectors

* feat: dont load entire category tree on group details page

* feat: dont load all categories on home page and user settings page

* feat: add pagination to /user/:userslug/categories

* fix: update schemas

* fix: more tests

* fix: test

* feat: flags page, dont return entire category tree

* fix: flag test

* feat: categories manage page

dont load all categories
allow changing root category
clear caches properly

* fix: spec

* feat: admins&mods page

dont load all categories

* fix: spec

* fix: dont load all children when opening dropdown

* fix: on search results dont return all children

* refactor: pass all options, rename options.cids to options.selectedCids

* fix: #9266

* fix: index 0

* fix: spec

* feat: #9265, add setObjectBulk

* refactor: shoter updateOrder

* feat: selectors on categories/category

* fix: tests and search filter

* fix: category update test

* feat: pagination on acp categories page

show order in set order modal

* fix: allow drag&drop on pages > 1 in /admin/manage/categories

* fix: teasers for deep nested categories

fix sub category display on /category page

* fix: spec

* refactor: use eslint-disable-next-line

* refactor: shorter
4 years ago
gasoved 970bd06fd2 refactor: improvements 4 years ago
gasoved 53e0d4d2e0 feat: banned-users group 4 years ago
Barış Soner Uşaklı f6cd2862bd feat: #9232, add profile picture into exported zip 4 years ago
Julian Lam fb84c78544 chore: remove deprecated `User.emailConfirm` [breaking]
Use `User.email.confirmByCode` instead.
4 years ago
Julian Lam b2b1450e5d fix: #9217, render 400 error page on bad access to /register 4 years ago
gasoved 69419571a9 fix: make sure inviter user exists 4 years ago
Barış Soner Uşaklı eaf62d39fd fix: #9177, handled multiple deleted users properly 4 years ago
Peter Jaszkowiak 2be396ff6e fix: email testing and settings change from ACP
- changing email SMTP settings wouldn't apply the first time
- "Send Test Email" now will report emailer errors in most cases
4 years ago
Barış Soner Uşaklı 80de572aa1 feat: add user.email.confirmByUid for sso plugins 4 years ago
Barış Soner Uşaklı 1f32d38778 fix: default values, clamp postsPerPage/topicsPerPage to max 4 years ago
Barış Soner Uşaklı 86b7f8a5d4 fix: #8962, dont show null for purged targets 4 years ago
Barış Soner Uşaklı 5f0f476b57 feat: #9005, use timestamp in profile/cover images
delete current one if keepAllUserImages is turned off
fix typo in data
4 years ago
psychobunny 4317cdea34 fix: #9002 ban templates not user friendly 4 years ago
Barış Soner Uşaklı d46740f860 fix: #9007 revoke old sessions after adding 4 years ago
Barış Soner Uşaklı a4fe4d3cf5 fix: allow guests to see their replies immediately 4 years ago
Barış Soner Uşaklı 5080f35752 fix: #8991, logout on password reset, dont verify email if password expired
dont allow same password on reset
4 years ago
Barış Soner Uşaklı 7f5efc3e93 fix: #8992, set email:confirmed for first admin user 4 years ago
Barış Soner Uşaklı 6e6a7a8f8a fix: #8969, export csv to file 4 years ago
Barış Soner Uşaklı dadb2527da fix: #8974, with password login for approval queue 4 years ago
Julian Lam 21d6225ce0 fix: 'already-deleting' error on subsequent account content deletions 4 years ago
Barış Soner Uşaklı 4f37eddc5e feat: clear reset tokens on user delete 4 years ago
Barış Soner Uşaklı 0ca40af834 fix: #8939, fix username change notification getting filtered out 4 years ago
Julian Lam 6e2da9966e refactor: move plugin hook methods to plugin.hooks.* 4 years ago
Julian Lam 046d0b1637
feat: allow pins to expire (if set) (#8908)
* fix: add back topic assert middleware for pin route

* feat: server-side handling of pin expiries

* refactor: togglePin to not require uid parameter [breaking]

* feat: automatic unpinning if pin has expiration set

* feat: client-side modal for setting pin expiration

* refactor: categories.getPinnedTids to accept multiple cids

... in preparation for pin expiry logic, direct access to *:pinned zsets is discouraged

* fix: remove references to since-removed jobs file for topics

* feat: expire pins when getPinnedTids is called

* refactor: make the togglePin change non-breaking

The 'action:topic.pin' hook now sends uid again, as before. However, if it is a system action (that is, a pin that expired), 'system' will be sent in instead of a valid uid
4 years ago
Barış Soner Uşaklı 1be08b2e8b fix: guest displayname 4 years ago
Barış Soner Uşaklı dbd814c25f fix: spec, only call modifyUser on unique user objects 4 years ago
Barış Soner Uşaklı ae5d4405c0 fix: setting 4 years ago
Barış Soner Uşaklı 9ca44e6f54
feat: add displayname into user obj #8637 (#8909)
* feat: add displayname into user obj #8637

* fix: spec

* perf: dont load settings if acp setting is turned off
4 years ago
Julian Lam a0b7a82350
feat(api): account deletion routes for the Write API (#8881)
* feat(api): account deletion routes for the Write API

* refactor: rewrite client-side calls to account deletion to use api

* style: apply DRY
4 years ago
Barış Soner Uşaklı 1d6bcbebde feat: https://github.com/NodeBB/NodeBB/issues/8147 4 years ago
gasoved 3ccebf112e
feat: invites regardless of registration type, invite privilege, groups to join on acceptance (#8786)
* feat: allow invites in normal registration mode + invite privilege

* feat: select groups to join from an invite

* test: check if groups from invitations have been joined

* fix: remove unused variable

* feat: write API versions of socket calls

* docs: openapi specs for the new routes

* test: iron out mongo redis difference

* refactor: move inviteGroups endpoint into write API

* refactor: use GET /api/v3/users/:uid/invites/groups

Instead of GET /api/v3/users/:uid/inviteGroups

* fix: no need for /api/v3 prefix when using api module

* fix: tests

* refactor: change POST /api/v3/users/invite

To POST /api/v3/users/:uid/invites

* refactor: make helpers.invite awaitable

* fix: restrict invite API to self-use only

* fix: move invite groups controller to write api, +tests

* fix: tests

Co-authored-by: Julian Lam <julian@nodebb.org>
4 years ago
Barış Soner Uşaklı 51b7eca119 fix: run every hour, dont show message if average_time is 0 4 years ago
Opliko 04f4429f72
Resolve #7514 - optional timer for registration queue (#8796)
* feat: #7514 Optional timer for registration queue

* feat: show minutes in average time

* fix: don't show total number of minutes

* feat: implement requested changes

* fix: just store minutes instead of milliseconds

* feat: set default values
4 years ago
Julian Lam 512f6de6de
feat: allow passwords with length > 73 characters (#8818)
* feat: allow passwords longer than 73 characters

Context: A bcrypt/blowfish limitation means that password length is capped at 72 characters. We can get around this without compromising on security
by hashing all incoming passwords with SHA512, and then sending that to bcrypt.

https://dropbox.tech/security/how-dropbox-securely-stores-your-passwords

* feat: add additional test for passwords > 73 chars

* fix: remove 'password-too-long' error message and all invocations

* test: added test to show that a super long password won't bring down NodeBB

* fix: remove debug log

* Revert "fix: remove 'password-too-long' error message and all invocations"

This reverts commit 1e312bf7ef7e119fa0f1bd3517d756ca013d5e79.

* fix: added back password length checks, but at 512 chars

As processing a large string still uses a lot of memory
4 years ago
Barış Soner Uşaklı 4818ec377e fix: missing await 4 years ago
Barış Soner Uşaklı a02ae6f5df refactor: simpler check in user.blocks.filter 4 years ago
Julian Lam a6a52430ce fix: remove setCategorySort and setTopicSort 4 years ago
Julian Lam aa8faf58a0 refactor: remove /users/{uid}/settings/{setting} route
@baris Also, I am now allowing the following properties to be saved in User.saveSettings:
- categoryTopicSort
- topicPostSort
- setCategorySort
- setTopicSort
4 years ago
Barış Soner Uşaklı a05905f196
performance improvements (#8795)
* perf: nconf/winston/render

cache nconf.get calls
modify middleware.pageView to call next earlier
don't call winston.verbose on every hook see https://github.com/winstonjs/winston/issues/1669
translate header/footer separately and cache results for guests

* fix: copy paste fail

* refactor: style and fire hook only log in dev mode

* fix: cache key, header changes based on template

* perf: change replace

* fix: add missing await

* perf: category

* perf: lodash clone

* perf: remove escapeRegexChars
4 years ago
Barış Soner Uşaklı db63f5e3f0 fix: #8781 4 years ago
Barış Soner Uşaklı 43afe7ffab refactor: async/await src/user/approval 4 years ago
Barış Soner Uşaklı 872bacf1c4
Admin/users (#8762)
* feat: wip admin/users

* feat: more work

* feat: more fixes

* feat: #8662, verified/unverified user groups

* feat: add filter

* feat: change user search to use filters array

* refactor: remove unused search call

* fix: tests

* fix: cant join system groups

* fix: upgrade script
4 years ago
Julian Lam 30b3fedca4 fix: password reset to invalidate all existing reset tokens for that uid 4 years ago
Barış Soner Uşaklı 1ee9384875 fix: #8757, allow all slashes in category route 4 years ago
Barış Soner Uşaklı dc29f4dca2 refactor: switch to using slugify module 4 years ago
cryptoethic b3ed26ac2c
feat: revoke user sessions above threshold (#8731)
* feat: revoke user sessions above threshold

* fix: removed translations from en-US

* fix: defined default maxUserSessions in install\data\defaults.json
4 years ago
Julian Lam a5af2dc819 feat: added PUT/DELETE /api/v1/users/:uid/ban routes 4 years ago
Barış Soner Uşaklı e60357d20d
feat: #6594, add top/popular sections to digest email (#8709) 4 years ago
Timothy Fike f85fe7faff
don't invite an already invited email (#8688)
* don't invite an already invited email

* add email-invited translation string
4 years ago
psychobunny b6f2f0e5d0 fix: #8681 change owner modal's search should check if user is banned 4 years ago
Barış Soner Uşaklı ac43cd8b6f fix: #8665, trim email before checking validity 4 years ago