Commit Graph

9846 Commits (aee216285f4738339a051bda489ff4bc14ec94d6)

Author SHA1 Message Date
Baris Usakli a228dc2de9 closes
Baris Usakli 82cda248f3 fix plugin requires
Baris Usakli 138154a71c move modules
Baris Usakli 5293a6515c fix lint
Baris Usakli fdbefa3d1f remove more parseInts
Barış Soner Uşaklı 175e13edf6 group data
Barış Soner Uşaklı c738dc7d3e remove some more parseInts
Barış Soner Uşaklı 7a44424214 parse '123' to 123 if it has no default
Barış Soner Uşaklı d07e3e6d97 if not in defaults use string
Barış Soner Uşaklı 4fff5e9baf closes
Baris Usakli 881185ae59 closes
Barış Soner Uşaklı ab7657d445 closes
Barış Soner Uşaklı ac39112271 remove more parseInts
Barış Soner Uşaklı 9c022afae1
Parse int ()
* Store config fields as JSON in the db

Fewer parseInts

* Remove unnecessary parseInts

* remove some dupe code add tests

* remove console.log

* remove more parseInts

* WIP: read meta.configs defaults from defaults.json

remove more parseInts

* more work

* add log for failing test

* update admin pwd

* fix tests, dont require posts/cache before configs are initialized

* handle saves

* Test boolean conditions

* remove more parseInts

* Fix boolean values

* remove lots more parseInts

* removed json parsing

* renamed var to number

* categories dont have timestamp
Barış Soner Uşaklı 60c58870af
remove hotswap ()
Barış Soner Uşaklı 92744a7200 closes
Barış Soner Uşaklı ee2f9e9434 remove some parseInts
Barış Soner Uşaklı f5fe91286e closes
Barış Soner Uşaklı f53984aeae refactor user/category data
Barış Soner Uşaklı c3a903142a closes
Barış Soner Uşaklı b2b33ffa57 topics data refactor
Barış Soner Uşaklı 26d4e0852f use includes instead of indexOf
use _.uniq instead of filter&indexOf
Baris Usakli a6c70412db temp fix for
Barış Soner Uşaklı 54c638c3c8 fix upgrade script for notification types
Barış Soner Uşaklı 5ef708d765 fix navigation
Barış Soner Uşaklı 250e8c01ff closes
Barış Soner Uşaklı da1a90a470 add search test
Barış Soner Uşaklı e6546e6263
this handles winston.error(err);
Barış Soner Uşaklı 9dd65cf772 closes
Baris Usakli 8b8feb5b88 remove emitter
Baris Usakli 9251912282 move methods from posts to posts/data
Baris Usakli baf91089a6 remove unused methods
Baris Usakli 444fd70ba3 test pubsub
Baris Usakli b4d8b7cf38 move sorted topics code out of recent
Baris Usakli 837f411783 closes
Barış Soner Uşaklı 986511e718 try with higher timeout
Barış Soner Uşaklı 1d15dc089b revert isCluster
Barış Soner Uşaklı 0aebb9caf8 closes
Barış Soner Uşaklı 154d7076d9 dont pass options
Barış Soner Uşaklı 9dbe68a9cb testing again
Barış Soner Uşaklı aa567a5f2d print out connString and opts
Barış Soner Uşaklı 2d8d234c57 test mongodb again
Barış Soner Uşaklı f4df89fe90 closes
Barış Soner Uşaklı 8079d3d3b7 add tids used to returned data
Barış Soner Uşaklı 85c60316ed
upgrade to winston 3.1, closes ()
* upgrade to winston 3.1

* fix winston in web/install and tests
Barış Soner Uşaklı 6c15aee888 add cache hits/misses to posts cache
Barış Soner Uşaklı b57db7fd8e
update groups join to take array of group names ()
* allow groups.join to take an array of group names

* pass an array to groups.join/leave in privileges

* split up groups/membership

* add hits/miss to group cache

* fix typo
Barış Soner Uşaklı c06480b82e add tests for blocked users teaser/unread
Barış Soner Uşaklı 687adea5dd closes
Barış Soner Uşaklı d4db8c2d42 removed reset
Barış Soner Uşaklı c9a415c469 check if process.send exists
Barış Soner Uşaklı 1024a0efa1 add reset to pubsub for tests
Barış Soner Uşaklı a0f5461860
don't set and read from topic hash in parallel ()
this was causing a test to fail, although very rarely
Barış Soner Uşaklı 1ec2d511b2 remove unnecessary code
Barış Soner Uşaklı ba21c5170a moved increase/decrease
moved these two methods into addPostToTopic&removePostFromTopic
Barış Soner Uşaklı e615391b22 convert values to string before removing
Barış Soner Uşaklı 5c7dd54815
fix zsets and update them on post move, closes ()
Barış Soner Uşaklı 702be3f6de https://github.com/NodeBB/nodebb-theme-persona/issues/363
Barış Soner Uşaklı ed9b3a31df fix navigation items not getting saved if they are not modified at all
if you add 2 nav items and dont make any changes they weren't being saved, adding order fixes this issue
Barış Soner Uşaklı cf1173b0c4 closes https://github.com/NodeBB/nodebb-theme-persona/issues/408
Barış Soner Uşaklı a3d463916c closes
Barış Soner Uşaklı 5e1c33bb3b Merge branch 'master' of https://github.com/NodeBB/NodeBB
Barış Soner Uşaklı a4d5c81de5 closes
Baris Usakli 3886a704e0 fix lint
Baris Usakli 84737b5a49 use buildForSelect
Baris Usakli 6dc84deca9 allow admins mods to watch/ignore categories for other users
Baris Usakli 71905bb2c6 fix watched categories
Baris Usakli 9ed4239d8e small changes and test for user/:slug/categories
André Zanghelini 523a2dc54c Add settings page to control watched categories ()
* Add settings page to control watched categories

* Fix passing undefined to pushUnreadCount
Barış Soner Uşaklı 1df9961eb4 make lint happy
Barış Soner Uşaklı 8df6838561 closes
Barış Soner Uşaklı b58ab48485 add test for /sessions controller
Barış Soner Uşaklı 002522834c closes
Barış Soner Uşaklı b033d6f115 add tid to post-purge event
Barış Soner Uşaklı 13a1497617 closes
Barış Soner Uşaklı 7bc69e9182 Merge branch 'master' of https://github.com/NodeBB/NodeBB
Barış Soner Uşaklı 1bea247748 add username/email to user-delete event
Barış Soner Uşaklı 49ba5af5fa
closes ()
Barış Soner Uşaklı 48d49cfcad Merge branch 'master' of https://github.com/NodeBB/NodeBB
Barış Soner Uşaklı d1491feed9 add tid to topic rename and post delete restore events
Barış Soner Uşaklı f77091d1ed change user delete so it returns quickly
Barış Soner Uşaklı f45d24d351
change if to !== 0
Barış Soner Uşaklı b7eaf4191e return correct post count if its out of sync
Barış Soner Uşaklı 77beaf2e15
Allow local login,closes ()
* WIP

* reset groups cache after every suite
Barış Soner Uşaklı d92ef9ca11
remove id
Ben Lubar cf4ea94e6d Fix single-host-cluster socket.io ()
It was silently dropping every message because every node thought it was the master node.
Julian Lam f95308bf33 move sharp require into the method it is used in src/file.js
Julian Lam ebabcc5e3c if authenticate middleware is overridden by plugin, check for req.user and return notAllowed helper otherwise
/cc @LudwikJaniuk
Barış Soner Uşaklı 4b970a1072 use lodash, load 3 posts per iteration
Barış Soner Uşaklı 18d0deeccb
update deprecated methods ()
Barış Soner Uşaklı 1cb2e1e368 remove console.log switch to series
Julian Lam c9dfb4e109 closes
Julian Lam 02046889ec closes
Ben Lubar 11b655163e Only run the DDL for session storage on the primary instance. ()
This fixes a restart loop caused by deadlocks in large clusters.
Barış Soner Uşaklı 1590452697 filter topics you cant read @benlubar
Barış Soner Uşaklı 95501e8fee
closes closes ()
* closes  closes 

* fix test, delete keys

* delete all bans on user delete

* fix upgrade script to actually read reason
Barış Soner Uşaklı 4570daa033 Merge branch 'master' of https://github.com/NodeBB/NodeBB
Barış Soner Uşaklı 3ed856f587 change if
Barış Soner Uşaklı 9724ef083e
remove v from query
Barış Soner Uşaklı 786311fa64
use value
Barış Soner Uşaklı 5a69f979a8
update processSortedSet to use withScores
Barış Soner Uşaklı cf75c79611
Unread changes closes ()
* WIP

* more unread work

* faster teaser block handling

if user doesn't have anyone blocked don't check

* much faster filtering of blocked posts

* add missing uid

* add tidsByFilter to return

* dont load all pids to find previous non-blocked teaser

* fix unread filters

they no longer use unread/new unread/watched etc they are query strings now

* shorter nav item code

* add unreplied to filters

fix icons not clearing to 0
dont increment unread counters if there is a reply in a topic where you ignored the topic creator
Barış Soner Uşaklı 7f863b8af0 Merge branch 'master' of https://github.com/NodeBB/NodeBB
Barış Soner Uşaklı 17ce482c9f closes
Barış Soner Uşaklı 7787c9b4bb
fix wrong year on upgrade script
Barış Soner Uşaklı 24601694db
fix wrong year on upgrade script
Baris Usakli edefab1d69 closes
add option to disable a category on creation
show disabled categories on manage privileges
Baris Usakli 4d5e164fd2 closes
Barış Soner Uşaklı 59b988a205 change test so it checks url
Barış Soner Uşaklı 71ccd67665 closes
calculate size of base64 image from buffer, still not perfect but better than string.length
Barış Soner Uşaklı b7ead6dc9c
Replace jimp with sharp ()
* add probe image size and max image size

* replace jimp and image-probe with sharp

* better name for test

* resize with just path

* resize thumb inplace

* use filename
Barış Soner Uşaklı 69c7260fe9 dont let sending more than max invites via bulk invite
Barış Soner Uşaklı 669a5135e1 closes
Barış Soner Uşaklı dff86b1ac9 closes
* flag notifications will go to the flag details page instead of the post or user that was flag
* if you assign a flag to yourself you won't get a notification about it
@benlubar
Barış Soner Uşaklı 089bf5d8bb
closes
Julian Lam 382d06bbb0 fixes -- no need to have gmods and admins access login sessions page
Barış Soner Uşaklı d996ea27be closes
Barış Soner Uşaklı 6a377568d2 closes fix typo in notif rescind
Barış Soner Uşaklı 08dfb3470c fix tests
Barış Soner Uşaklı b43bfa3d5b closes
-moved user.blocks.filter from unread controller to getUnreadTopics so
topics are filtered at other places this function is called
- when a new post is made do not send it to uids that have blocked the
poster
- update getUnreadTids so it does not return topics that have new posts
from blocked users
- update hasReadTopics so it does not return false data if topic has new
posts from blocked users
Barış Soner Uşaklı 41aae6f418 closes
Barış Soner Uşaklı 37ca5a1c63 filter falsy teasers
Barış Soner Uşaklı 93d52ef338 default to 'recent' sort
Barış Soner Uşaklı 25fed0aa8d change isPasswordCorrect to return false if user does not have password
Barış Soner Uşaklı 6f18cf368b closes
Barış Soner Uşaklı 446b125c83 escape post content
LudwikJaniuk c7f3b76b4e DRY req props that depend on auth (fix ) ()
* DRY req props that depend on auth (fix )

authentication leads to req.loggedIn and req.uid being set. However, a
later authentication event might outdate them. Here, I create one
function for setting those properties, and make sure it also is called
on the `action:middleware.authenticate` hook, which would be such an
authentication event. If there are other places, those should be added
as well.

* fix lint errors

* fix lint error

* change exports
Barış Soner Uşaklı 3e1b007f9f escape title in post queue
Ben Lubar 97a3079bc0 Optimize PostgreSQL session store.
- Sets session ID to be a constant-sized character field inline in the
  table instead of a variable-length character field compressed outside
  of the row.
- Changes the session data from "json" to "jsonb" which is faster and
  smaller on disk with the drawback of not maintaining key order and
  whitespace (which we don't care about at all)
- Adds a clustered index on the session expiration timestamp, which will
  make periodic session purging much faster.

(For an example, WTDWTF currently has 482355 sessions in the table, and
 because there is no index on the expiration timestamp, PostgreSQL must
 check all the rows in the table every time.)

This upgrade script can run concurrently with a live NodeBB instance,
but any action that touches sessions will wait until the upgrade script
is done.

Does not touch the database if the database driver is not set to
PostgreSQL or if there is a Redis database configured.
Julian Lam c2c925cacd closes
Julian Lam 29836aaad9 rename session account middleware to sessions, plural, prep for fixing
Baris Usakli 5b45b2f72c closes
Barış Soner Uşaklı 0519f84734
Promisify modules ()
* WIP promisify

* promisify psql

* ability to skip some keys

* dont promisify client object

* remove async

* clone entire module so it has all properties

* add shim for node 6

* ignore sessionStore as well

* ignore pool on psql
Julian Lam c1725442ea added progress bar to username_email_history upgrade script
Julian Lam 545e678e8a fixes
Julian Lam 5c04ec2d63 removed client-side chat message length check in favour of server-side check, firing new hook on messaging.checkContent for hooks to intercept
Julian Lam 1e3cdc99ac fixes
Andrew Rodrigues a06b33a713 fix html characters when cloning children categories
Julian Lam aaa9561b7f Revert "moved filter:post.getPostSummaryByPids to before parsePosts call"
This reverts commit cf82407a8f.
Julian Lam cf82407a8f moved filter:post.getPostSummaryByPids to before parsePosts call
/@pitaj
Barış Soner Uşaklı ae4016d9e0 add getCateries to helpers
Andrew Rodrigues 12940b577b closes
Julian Lam 2ce6a85756 properly closes
Julian Lam f751d21d1e removed debug line
Julian Lam f9d3484ec6 fixes
Julian Lam ed9dc113b0 sanitizing notes in flags details page, fixes
Julian Lam a77630c6be closes
Ben Lubar 33228bb7fe PostgreSQL database driver ()
* [test/database/list] Fix test list 4 being used in two different tests

* [database/postgres] PostgreSQL database driver

* [database/postgres] Make transactions work based on continuation scope.

* [database/postgres] Implement nested transactions

* eslint --fix

* Add database changes from earlier this week to the PostgreSQL driver.

* Fix typo

* Fix postgres.incrObjectFieldBy returning undefined instead of null when given NaN

* [database/postgres] Fix sortedSetsCard returning an array of strings.

* Update socket.io postgres adapter

* Fix PostgreSQL erroring when multiple updates are made to the same sorted set entry in a single operation.

Add a test case to catch this error.

* Fix lint errors.

* Only prune sessions on one instance in a cluster to avoid deadlocks.

They're caught and handled by the database server, but they spam the logs.

* Fix arguments.slice.
Jimb Esser 3cccbbc1f2 Add option to enable/disable HSTS
Also fix HSTS middleware being added twice.
Barış Soner Uşaklı 1c286e4536 not even used