Commit Graph

743 Commits

Author SHA1 Message Date
Barış Soner Uşaklı
290a9395c0 fix: pass object to.auth 2025-09-06 13:47:46 -04:00
Barış Soner Uşaklı
09898b94ec fix: return null if field is falsy
fixes MongoServerError: FieldPath cannot be constructed with empty string error when getObjectField is called with a falsy value
2025-08-22 11:06:47 -04:00
Barış Soner Uşaklı
eac3d0a043 fix: redis connect host/port 2025-07-20 11:57:34 -04:00
Barış Soner Uşaklı
0b9bfc1ce1 refactor: parallel socket.io adapter 2025-06-18 16:59:57 -04:00
Barış Soner Uşaklı
f7f70468fd fix: pubsub on node-redis 2025-06-18 13:17:29 -04:00
Barış Uşaklı
14043ab0fd Node redis (#13500)
* refactor: start migrating to node-redis

* few more zset fixes

* fix: db.scan

* fix: list methods

* fix set methods

* fix: hash methods

* use hasOwn, remove cloning

* sorted set fixes

* fix: so data is converted to strings before saving

otherwise node-redis throws below error
TypeError: "arguments[2]" must be of type "string | Buffer", got number instead.

* chore: remove comments

* fix: zrank string param

* use new close

* chore: up dbsearch

* test: add log

* test: more log

* test: log failing test

* test: catch errors in formatApiResponse

add await so exception goes to catch

* tetst: add log

* fix: dont set null/undefined values

* test: more fixes
2025-06-18 13:04:57 -04:00
Barış Soner Uşaklı
16504bad81 fix: sql injection in sortedSetScan 2025-05-12 10:02:59 -04:00
Barış Uşaklı
b57ce29dc6 chore: up pg, pg-cursor (#13351)
* chore: up pg, pg-cursor

* test: check file directly
2025-04-22 13:32:41 -04:00
Barış Soner Uşaklı
4c92248a4b list remove all (#13113)
* list remove all

* one more test

* sortedSetIncrByBulk

* remove name

* incrObjectFieldByBulk

* test: disable api tests

* try merge

* another test

* give upon bulk incr

* update so answer

* one more try

* fix: name

* chore: up dbsearch
2025-02-02 03:30:52 -05:00
Barış Soner Uşaklı
0087764ce0 Merge branch 'master' into develop 2024-12-24 12:37:18 -05:00
Barış Soner Uşaklı
c60cee5997 fix: #13007, replace $ with \uFF04, like . 2024-12-24 12:37:06 -05:00
Barış Soner Uşaklı
eb49a64974 Merge branch 'master' into develop 2024-12-24 10:13:51 -05:00
Barış Soner Uşaklı
a6f0eba5a1 fix: test on redis 2024-12-23 20:39:52 -05:00
Barış Soner Uşaklı
c69fa811e5 fix: convert to str than filter
prevent empty strings from getting passed to mongodb
https://github.com/NodeBB/NodeBB/issues/13007#issuecomment-2560503754
2024-12-23 20:29:42 -05:00
Julian Lam
2ab72ada3f Merge remote-tracking branch 'origin/develop' into activitypub 2024-12-11 10:12:33 -05:00
Barış Soner Uşaklı
9d2af7e10c refactor: replace math.random with crypto 2024-12-09 18:18:02 -05:00
Julian Lam
45d2fe11dc Merge remote-tracking branch 'origin/develop' into activitypub 2024-12-04 15:24:26 -05:00
Barış Soner Uşaklı
8c5d7c4d13 deps: update connect-redis to 8 2024-12-01 09:29:46 -05:00
Barış Soner Uşaklı
c276aa1a99 Merge branch 'develop' into activitypub 2024-06-14 20:45:39 -04:00
Barış Soner Uşaklı
92f1f189a8 fix mongo stats 2024-06-14 20:23:50 -04:00
Barış Soner Uşaklı
6f831d1ce2 Merge branch 'develop' into activitypub 2024-06-08 12:36:51 -04:00
Barış Soner Uşaklı
1b283ccc29 test: return empty array on db.exists([]); 2024-06-07 21:44:57 -04:00
Barış Soner Uşaklı
b1f9ad5534 Squashed commit of the following:
commit 4e0e792232
Merge: 24d0999fb5 70b4a0e2ae
Author: Barış Soner Uşaklı <barisusakli@gmail.com>
Date:   Fri Jun 7 19:26:49 2024 -0400

    Merge branch 'master' into develop

commit 70b4a0e2ae
Author: Barış Soner Uşaklı <barisusakli@gmail.com>
Date:   Fri Jun 7 19:14:13 2024 -0400

    feat: allow passing min,max to sortedSetsCardSum

    to get rid of multiple db calls in profile page

commit 6bbe3d1c4c
Author: Barış Soner Uşaklı <barisusakli@gmail.com>
Date:   Fri Jun 7 14:08:48 2024 -0400

    fix: dont show error alert when user user mouse overs votes

    if they dont have permission to view votes

commit 24d0999fb5
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Thu Jun 6 13:49:14 2024 -0400

    fix(deps): update dependency pg-cursor to v2.11.0 (#12617)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

commit bee05fe212
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Thu Jun 6 13:28:59 2024 -0400

    fix(deps): update dependency pg to v8.12.0 (#12616)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-07 19:27:44 -04:00
Barış Soner Uşaklı
70b4a0e2ae feat: allow passing min,max to sortedSetsCardSum
to get rid of multiple db calls in profile page
2024-06-07 19:14:13 -04:00
Barış Soner Uşaklı
70d2a6249d Merge branch 'develop' into activitypub 2024-05-12 21:24:27 -04:00
Opliko
f4f0eb30dc Small docker improvements and fixes (#12335)
* feat: disable uneecessary npm features

disables npm audit, fund and update-notifier for a few second startup speedup

* fix: make default actually defaults not forced values

* feat: upgrade on container changes

* feat: support changing build verb

* fix: use local volumes instead of bind mounts

* fix: save just the hash without any unexpected whitespace

* feat: use run with mount instead of copying for cross-platfomr builds

* ci: try with minimal cache

* ci: don't fetch all branches

* feat: bsic support for other package managers via PACKAGE_MANAGER env var

* refactor: better structured entrypoint

Co-authored-by: NavyStack <137406386+NavyStack@users.noreply.github.com>

* ci: properly cache the node_modules mount

* fix: syntax error

* refactor: fine tune docker-related files

* ci: docker image taging (time, latest)

* fix: remove the trailing slash for correct directory path

* docker: todo- use environment variables to create files

* docker: fix permissions

* docker: fix permissions

* docker: fix stage

* feat: auto-upgrade on package.json changes

* fix: don't profile-gate postgres

---------

Co-authored-by: NavyStack <137406386+NavyStack@users.noreply.github.com>
Co-authored-by: NavyStack <navystack@askfront.com>
2024-05-10 11:10:42 -04:00
Julian Lam
5b74f6dac5 fix: move fallback 0 return in parseIntFields to other side of ternary conditional 2024-03-06 11:47:46 -05:00
Julian Lam
f368a1a87f fix: remove intFields hack and update db.parseIntFields to only parseInt if field value is a number 2024-03-06 11:45:34 -05:00
Barış Soner Uşaklı
5e89dfad55 refactor: move tomap inside 2024-02-29 16:59:40 -05:00
Barış Soner Uşaklı
4a405ce032 fix: retry setAdd on e11000 error 2024-02-21 11:36:04 -05:00
Barış Soner Uşaklı
b905013950 fix: closes #12185, fix cli user password reset
refactor session get/destroy
2023-11-28 20:58:07 -05:00
Barış Soner Uşaklı
6c7e614417 feat: batch.processSortedSet min/max (#12129)
* feat: batch.processSortedSet min/max

* test if this works
2023-10-26 10:23:27 -04:00
Barış Soner Uşaklı
e542b27d1d feat: update to mongodb 6.1 (#12087) 2023-10-15 13:38:57 -04:00
Barış Soner Uşaklı
c7c6e8ffb4 refactor: get rid of async.series 2023-10-13 12:11:41 -04:00
Barış Soner Uşaklı
0f4e66485e fix: closes #12054 handle negative start/stop in psql 2023-10-03 13:53:18 -04:00
Barış Soner Uşaklı
90f29571f1 refactor: add connectionTimeout to psql
only sleep if there is more than one iteration in processSortedSet
2023-08-18 19:26:57 -04:00
Barış Soner Uşaklı
7a79fed828 feat: closes #11902, ability to clear search history 2023-08-11 20:43:56 -04:00
Barış Soner Uşaklı
528e7e5a06 create obj with no prototype 2023-07-25 12:43:29 -04:00
Barış Soner Uşaklı
9b1cc57604 add reverse support to db.processSortedSet (#11826) 2023-07-20 22:26:55 -04:00
Barış Soner Uşaklı
b93cc7884e chore: remove test log 2023-07-15 23:42:06 -04:00
Barış Soner Uşaklı
934df69e9d test: log e11000 errors 2023-07-15 23:30:19 -04:00
Barış Soner Uşaklı
052f1f2232 add error message for testing 2023-07-15 22:23:29 -04:00
Barış Soner Uşaklı
9b901783fa Chat refactor (#11779)
* first part of chat refactor

remove per user chat zsets & store all mids in chat:room:<roomId>:mids
reverse uids in getUidsInRoom

* feat: create room button

public groups wip

* feat: public rooms

create chats:room zset
chat room deletion

* join socket.io room

* get rid of some calls that load all users in room

* dont load all users when loadRoom is called

* mange room users infinitescroll

dont load all members in api call

* IS for user list

ability to change groups field for public rooms
update groups field if group is renamed

* test: test fixes

* wip

* keep 150 messages

* fix extra awaits

fix dupe code in chat toggleReadState

* unread state for public rooms

* feat: faster push unread

* test: spec

* change base to harmony

* test: lint fixes

* fix language of chat with message

* add 2 methods for perf

messaging.getTeasers and getUsers(roomIds)
instead of loading one by one

* refactor: cleaner conditional

* test fix upgrade script fix

save timestamp of room creation in room object

* set progress.total

* don't check for guests/spiders

* public room unread fix

* add public unread counts

* mark read on send

* ignore instead of throwing

* doggy.gif

* fix: restore delete

* prevent entering chat rooms with

meta.enter

* fix self message causing mark unread

* ability to sort public rooms

* dont init sortable on mobile

* move chat-loaded class to core

* test: fix spec

* add missing keys

* use ajaxify

* refactor: store some refs

* fix: when user is deleted remove from public rooms as well

* feat: change how unread count is calculated

* get rid of cleaned content

get rid of mid

* add help text

* test: fix tests, add back mid

to prevent breaking change

* ability to search members of chat rooms

* remove

* derp

* perf: switch with  partial data

fix tests

* more fixes

if user leaves a group leave public rooms is he is no longer part of any of the groups that have access

fix the cache key used to get all public room ids

dont allow joining chat socket.io room if user is no longer part of group

* fix: lint

* fix: js error when trying to delete room after switching

* add isRoomPublic
2023-07-12 13:03:54 -04:00
Barış Soner Uşaklı
9198a95173 add again 2023-06-15 19:33:41 -04:00
Barış Soner Uşaklı
04998908ba Fixes for "validate email" & "send validation email" in ACP (#11677)
* confirmObj changes

dont expire confirm:<code>, add a expires field instead
dont expire confirm:byUid:<uid>

on admin manage users display the users email status
	1. verified
	2. verify email sent (pending)
	3. verify email sent (expired)
	4. no email entered

fix validate email in acp to use
	email in user:<uid> if they have one
	if not check if its in confirm:<code>
	if its not in above cant validate throw error

fix send validate email to use
	email in user:<uid> if they have one
	if not check if its in confirm:<code>
	if its not in above too cant validate throw error

* add back socket.io tests

* test: fix confirm tests

no longer using pexpire
return correct time left on token

* chore: update openapi

* fix: delete call

* test: mget test fixes

* test: fix tests
2023-06-05 12:12:48 -04:00
Barış Soner Uşaklı
2cdc454f3e use order by 2023-05-07 23:48:09 -04:00
Barış Soner Uşaklı
f083cd559d feat: add getSortedSetMembersWithScores (#11579)
* feat: add getSortedSetMembersWithScores

* lint: fix

* test: fix redis

* fix: mongo/psql
2023-05-07 22:32:05 -04:00
Barış Soner Uşaklı
6bed65dde6 fix: numeric strings in mongo (#11498) 2023-04-19 17:16:45 -04:00
Julian Lam
596db09f7e Merge branch 'master' into develop 2023-03-22 10:50:29 -04:00
Barış Soner Uşaklı
fafa130406 chore: up connect-redis to 7.x, drop node 14 (#11376) 2023-03-17 18:30:05 -04:00