848 Commits

Author SHA1 Message Date
Barış Soner Uşaklı
fe811537e9 refactor: remove "password" in comments 2024-12-09 14:40:49 -05:00
Barış Soner Uşaklı
61e5293a76 test: dont track session for api/v3 (#12660)
since they get destroyed when the request ends
2024-06-27 10:26:06 -04:00
Barış Soner Uşaklı
35710e6551 catch all deleted/missing and 404 2024-06-11 18:28:10 -04:00
Barış Soner Uşaklı
9ecee78293 test: fix path replace 2024-06-11 17:56:45 -04:00
Barış Soner Uşaklı
1c44f55d3c handle sub account pages in redirect 2024-06-11 16:56:04 -04:00
Barış Soner Uşaklı
17cd3b684c move slug handling to middleware #12632 2024-06-11 16:24:56 -04:00
Barış Soner Uşaklı
66adfa2999 fix: closes #12632, dont load data twice 2024-06-11 15:38:40 -04:00
Barış Soner Uşaklı
4430de8c4a fix: don't error if file required too early
Exception during run: TypeError: ttl must be positive integer or Infinity if set
    at new TTLCache (/home/runner/work/NodeBB/NodeBB/node_modules/@isaacs/ttlcache/index.js:35:13)
2024-06-11 12:09:24 -04:00
Barış Soner Uşaklı
2d86552b85 refactor: #12623, add filter:config.get.admin
to add admin only config values
add /api/admin/config to retrieve config object with admin values included
2024-06-08 13:42:43 -04:00
Barış Soner Uşaklı
ca4a7751e2 fix: dont load chat rooms for quests/spiders 2024-06-06 12:14:08 -04:00
Barış Soner Uşaklı
2c0f8c913b refactor: render 2024-05-16 07:47:49 -04:00
Barış Soner Uşaklı
14f5774f6a fix: is user doesnt have view:users privilege
dont redirect uid/1 to userslug
2024-04-12 12:50:51 -04:00
Barış Soner Uşaklı
ca07e51730 fix: if you have chat:privileged the chat icons should show up 2024-04-11 09:55:57 -04:00
Barış Soner Uşaklı
d13bfacd74 Merge branch 'master' into develop 2023-12-13 13:18:32 -05:00
Barış Soner Uşaklı
2dc1def51f fix: #12227, fix crash in redirect 2023-12-13 13:18:07 -05:00
Julian Lam
d7c6b3d60e refactor(socket.io): deprecate categories.setWatchState in favour of api.categories.setWatchState 2023-10-31 11:32:07 -04:00
Barış Soner Uşaklı
b1ff93f85c refactor: get rid of util.promisify on async function 2023-10-22 16:15:28 -04:00
Barış Soner Uşaklı
b398321a5e Chat with privileged (#12092)
* Update headers.js

Fixes X-Upstream-Hostname header for os hostnames with invalid characters

* Added missing period in allowed hostname chars

Allowed hostname chars should include A-Za-z0-9-. based on https://man7.org/linux/man-pages/man7/hostname.7.html

* feat: add chat:privileged global privilege

to only allow chatting with privileged users

* test: fix priv test

* test: one more fix

---------

Co-authored-by: chadjw <chad.warner@gmail.com>
2023-10-17 13:19:25 -04:00
Julian Lam
d7e9f32412 test: additional tests for #12034 2023-09-26 14:54:13 -04:00
Julian Lam
74902e4a7b fix: #11808, reduce zeal of middleware.registrationComplete
Now will judiciously check whether the target category or topic is restricted to verified users before redirecting unverified users to the email confirmation interstitial
2023-09-26 14:54:13 -04:00
Barış Soner Uşaklı
9e829b983d 308 /uid/<uid> to /user/<slug> 2023-08-16 20:28:34 -04:00
Julian Lam
bcc4b82cc6 feat: middleware.handleMultipart, applies on API routes — invokes multipart middleware based on content-type header 2023-08-03 12:16:03 -04:00
Barış Soner Uşaklı
a5cc5372cb Merge branch 'master' into develop 2023-07-15 20:05:27 -04:00
Barış Soner Uşaklı
a4dba8d3fa fix: #11804, fix direction of dropdown on rtl 2023-07-15 18:54:50 -04:00
Barış Soner Uşaklı
539a4d437c Merge branch 'master' into develop 2023-07-15 15:52:49 -04:00
Barış Soner Uşaklı
a0478c7049 fix: #11803, fix rtl in acp 2023-07-15 15:06:12 -04:00
Barış Soner Uşaklı
bc8dbc2084 add roomId class to body 2023-07-13 20:01:39 -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ı
e8b40b5884 fix persona defaults
fix missing theme:id
2023-07-12 10:20:20 -04:00
Barış Soner Uşaklı
0183e5f8d2 fix: #11775, trim -rtl from targetSkin 2023-07-03 18:50:09 -04:00
Barış Soner Uşaklı
ad1da0218a Merge branch 'master' into develop 2023-06-20 18:52:36 -04:00
Barış Soner Uşaklı
090a792168 fix: #11729, only check registered users
ignore guests(uid 0) & spiders(uid -1)
2023-06-18 18:42:49 -04:00
Barış Soner Uşaklı
556fd65d51 feat: custom skins panel in acp 2023-06-16 18:04:22 -04:00
Barış Soner Uşaklı
3080eb7e01 feat: #11714, add registrationQueue flag 2023-06-15 09:13:04 -04:00
Barış Soner Uşaklı
2edfe0ef3e feat: bring back noskin option
if forum sets a default skin there was no way for the user to go back to the no skin version
2023-06-10 11:55:59 -04:00
Barış Soner Uşaklı
e89cfd447e feat: closes #11671, allow custom classes on body
res.render('myplugin', { bodyClasses: ['myplugin', 'special']});
2023-06-02 17:30:11 -04:00
Barış Soner Uşaklı
11cd32722e Merge branch 'master' into develop 2023-05-28 18:13:50 -04:00
Barış Soner Uşaklı
67f44a3212 feat: add back support for req.body._csrf
used in login.tpl etc for noscript login
2023-05-27 16:46:04 -04:00
Barış Soner Uşaklı
adf14ea57c fix: browser title if options.title is undefined 2023-05-16 13:05:03 -04:00
Barış Soner Uşaklı
51096ad234 poc: use csrf_token in ws handshake (#11573) 2023-05-15 11:15:53 -04:00
Barış Soner Uşaklı
63b859f053 poc: use csrf_token in ws handshake (#11573) 2023-05-15 11:12:46 -04:00
Barış Soner Uşaklı
bd80d36e0d Merge branch 'master' into develop 2023-05-12 09:48:25 -04:00
Julian Lam
7b8bffd763 feat: internal utility functions for token management (creation, deletion, etc)
Including tests
2023-05-11 15:22:50 -04:00
Julian Lam
686ecea123 fix: #11589, regression where a user could not confirm their email if requireEmailAddress was enabled 2023-05-11 11:34:24 -04:00
Barış Soner Uşaklı
e1473bcc2d fix: strip html tags from browser title 2023-05-07 19:00:21 -04:00
Julian Lam
84313712a2 fix: add an additional check on page load to enforce requireEmailAddress setting
The old behaviour would require that an email be entered, but did not block access to the forum (nor did it ensure that the email was verified).

The new behaviour (if the setting is enabled) will ensure that only those users with a confirmed email can continue through.

The only exceptions are super admins (so they don't get locked out).
2023-05-05 14:38:01 -04:00
Julian Lam
d814e281a0 feat: write API shorthand to query post routes by their topic index (requires tid in either query string or request body)
middleware.checkRequired is also updated to check for matches in req.query as well.
2023-05-01 12:02:34 -04:00
Barış Soner Uşaklı
af7ab9b468 Merge branch 'master' into develop 2023-04-16 18:49:49 -04:00
Veronikya
c931183287 fix: NodeBB#11482 thumbs Post Can not upload a thumbnail, only multip… (#11483)
* fix: NodeBB#11482 thumbs Post Can not upload a thumbnail, only multiple uploads

* Modify upload thumbnail test

* Modify upload thumbnail test +,

* Get rid of v2 uploads test

* edit times

* Modify amount of files associated post test

* edit post file amount
2023-04-15 17:56:36 -04:00
Julian Lam
2615c1e584 fix: #11426, proper v3 style error on maintenance mode [breaking]
The v3-style error only applies to v3 routes. Existing Read API and page routes are unaffected.
2023-04-14 11:59:15 -04:00