716 Commits (88e5cda5b4a0e56488f01e34eef54173069f05cf)

Author SHA1 Message Date
Barış Soner Uşaklı b8cafefce2 fix: winston usages 4 years ago
Julian Lam 6e2da9966e refactor: move plugin hook methods to plugin.hooks.* 4 years ago
Barış Soner Uşaklı 6ac73ccb7e feat: #8801, disable express compression by default 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ı b295d15eae fix: tests 4 years ago
psychobunny 14ba1a6dbb feat: analytics:maxCache setting in ACP
I removed a TODO from core. Watch your head as flying pigs are abound
4 years ago
Barış Soner Uşaklı 5f10d67db5
Remove sounds (#8617)
* feat: remove sounds

* feat: remove more sounds

* feat: disable sounds plugin

* fix: openapi
4 years ago
Barış Soner Uşaklı 774e5d0429 feat: add helmet middlewares 5 years ago
Barış Soner Uşaklı c39c51139b fix: remove default helmet 5 years ago
Julian Lam 0f10e0836b fix: remove duplicate configuration for helmet-hsts 5 years ago
Barış Soner Uşaklı e80379dc0e feat: display stack trace on winston.error 5 years ago
Barış Soner Uşaklı 5781a2dc65
feat: fix session mismatch errors by clearing cookie on logout (#8338)
* 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
5 years ago
Julian Lam d6e3f3f058
fix: #8142, broken site if no server-side session (#8148)
* fix: #8142, broken site if no server-side session

During the `addHeader` middleware, a check is now done to see if
`req.session.meta` is present. This value is only present if the user
has a valid server-side session.  If it is missing, then it is probably
safe to assume that the server-side session was deleted (either
intentionally or accidentally). In that scenario, the client-side cookie
should be cleared.

Also, there was an issue where the sessionRefresh flag was never cleared
after a successful login, so that was fixed too.

* feat: exported method to get cookie config

* fix: don't clear cookie if cookie is being set

* fix: socket.io tests

Co-authored-by: Barış Soner Uşaklı <[email protected]>
5 years ago
Barış Soner Uşaklı e3952674ba fix: hsts always enabled 5 years ago
Barış Soner Uşaklı 5de6d8857a feat: #7760, body-parser config 5 years ago
Barış Soner Uşaklı 2c4f04462f refactor: async/await controllers 6 years ago
Barış Soner Uşaklı 0d047f4eb9 feat: #7743, webserver 6 years ago
Barış Soner Uşaklı a15c50bf62 feat: #7743, meta/sounds 6 years ago
Barış Soner Uşaklı fcf8fd51cb feat: #7743 meta/blacklist 6 years ago
Julian Lam 8b1dadb7f8 fix: #7722, hsts deprecation warnings 6 years ago
Barış Soner Uşaklı ae0fe5e880 feat: more naming 6 years ago
Barış Soner Uşaklı 989879a6b5 fix: #7115 6 years ago
Julian Lam 5f3d1c76c8
fix: #7038, autoLocale logic not playing nicely with no-refresh auths (#7059)
* fix: #7038, autoLocale logic not playing nicely with no-refresh auths

- on login, req.query.lang is deleted (since it seems to be left over)
- on logout, the middleware.autoLocale is executed, which resets
  req.query.lang
- middleware.autoLocale is new, just refactored existing logic in
  webserver.js into new middleware method.

* style: tests, use lodash

* fix: timeago strings not switching languages on login or out
6 years ago
Baris Usakli adb647a8ae export express app from webserver 6 years ago
renovate[bot] 64b9dabff8 chore(deps): update dependency eslint-config-airbnb-base to v13 (#6599)
* chore(deps): update dependency eslint-config-airbnb-base to v13

* chore: #6599, linting 😬
6 years ago
Barış Soner Uşaklı 9c022afae1
Parse int (#6853)
* 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
6 years ago
Barış Soner Uşaklı 60c58870af
remove hotswap (#6835) 6 years ago
Barış Soner Uşaklı 1ec2d511b2 remove unnecessary code 6 years ago
Jimb Esser 3cccbbc1f2 Add option to enable/disable HSTS
Also fix HSTS middleware being added twice.
7 years ago
Peter Jaszkowiak 04d31fe1d4 Precompile all templates
- Benchpress compilation is 33x faster now
- Native module with JS fallback and pre-built binaries
- Dev template build is <1sec now
- Minified template build is ~5sec (uglify accounts for almost all)
7 years ago
Julian Lam 5cf662e565 closes #6613 7 years ago
Barış Soner Uşaklı 77d47b31fb cleanly shutdown
wait for webserver to stop accepting connections
destroy current connections
wait for db connection to close
7 years ago
Julian Lam c25d752573 Merge remote-tracking branch 'origin/master' into develop 7 years ago
Julian Lam 98b0bdc7e1 added helmet for better standard of protection across the board 7 years ago
Julian Lam a4a961639d only triggering forum updated messaging if hostname matches, fixes #6333 7 years ago
Barış Soner Uşaklı ac1f7eefe5 closes #2304 7 years ago
Julian Lam a4939d78fe Moved ping to its own controller
re: #6281
7 years ago
Peter Jaszkowiak e609e497b3 Provide more error information to logs
Provides full stack instead of just message
7 years ago
Barış Soner Uşaklı 2aaf6900d1 closes #5998 7 years ago
Baris Usakli 79598c32d3 remove unused function 7 years ago
Julian Lam 6852c92ed6 Merge remote-tracking branch 'origin/develop' 7 years ago
Peter Jaszkowiak dc87d7fc0f Use .js instead of .jst
Fix #5934
7 years ago
Baris Usakli b56d6f8b50 make call to db in /ping and /sping 7 years ago
Peter Jaszkowiak abffc29128 Use Benchpress (#5901)
* Use Benchpress

* Use Benchpress.compileParse

* Error for template load failure

* Use benchpressjs package

* Compile templates on demand

* Fix user settings page

* Fix admin search to exclude `.jst` files

* Fix 500-embed

So ajaxify can still show an error if the server goes down
8 years ago
Julian Lam 932b3f06a5 closes #5797 8 years ago
Julian Lam d117c65893 oops :shipit: 8 years ago
Julian Lam d98b3e8056 automatically lowercasing env vars in nconf, fixes #2544 8 years ago
Jorge Meireles a0e501676c Add relativePath to /ping and /sping 8 years ago
Barış Soner Uşaklı f6ac92111b style changes 8 years ago
Barış Soner Uşaklı 3a1eba2537 merge 8 years ago