Commit Graph

68 Commits

Author SHA1 Message Date
Alice Gaudon 4cbc73a25f Fix ServeStaticDirectoryComponent while developping swaf
Also move core version detection to Application
2021-03-30 12:03:26 +02:00
Alice Gaudon aed825c4d6 FormHelperComponent: don't flash empty previous form data 2021-01-25 17:26:42 +01:00
Alice Gaudon 5caa0be862 FormHelperComponent: add field ID prefix to prevent conflicts
Fixes #20
2021-01-25 17:26:42 +01:00
Alice Gaudon 4745ae4e17 Fix session id not available in websocket listeners
Fixes #21
2021-01-25 16:36:15 +01:00
Alice Gaudon e4768141bc Simplify RedirectBackComponent into PreviousUrlComponent
Closes #12
2021-01-24 22:42:20 +01:00
Alice Gaudon 19c8b86ff8 Fix express body parsing middlewares corrupting AsyncLocalStorage
Closes #17
2021-01-24 16:35:33 +01:00
Alice Gaudon 1b8ff1428f Add persist session checkbox on login
Makes session not persistent by default
Closes #11
2021-01-24 16:33:33 +01:00
Alice Gaudon 94cb157520 Remove connect-redis that breaks context with RedisStore 2021-01-22 15:55:06 +01:00
Alice Gaudon 8fab93e709 Use AsyncLocalStorage to provide requestId context 2021-01-22 15:54:26 +01:00
Alice Gaudon 2c66c66a39 logging: add status code description for redirections 2021-01-21 15:45:20 +01:00
Alice Gaudon 87b4facea0 Upgrade dependencies and update to express session new typings 2020-12-04 15:24:22 +01:00
Alice Gaudon b75b227ca1 Add required username to magic link authentication and fix many errors 2020-11-14 17:24:57 +01:00
Alice Gaudon efdd81b650 Auth: refactor to support multiple auth factors and add password factor 2020-11-11 19:30:30 +01:00
Alice Gaudon 1fce157104 logging: prevent full logging of errors for silent logs 2020-11-11 19:29:23 +01:00
Alice Gaudon f20da06d43 logging: also log ip address 2020-11-11 19:29:23 +01:00
Alice Gaudon a09e92dd96 logging: make silent errors actually silent 2020-11-04 12:52:07 +01:00
Alice Gaudon c966536950 NunjucksComponent: fix view loaders using cache when in dev env 2020-11-03 17:46:04 +01:00
Alice Gaudon 4d0c714dbd Render emails using NunjucksComponent's environment 2020-11-03 10:29:36 +01:00
Alice Gaudon 88e5e19730 Replace custom logging system with tslog 2020-11-02 17:50:12 +01:00
Alice Gaudon 93bff1fdca Nunjucks/globals: fix route() context 2020-10-02 12:13:48 +02:00
Alice Gaudon f41a456524 Improve typing precision of CacheProvider.get() 2020-10-01 13:58:50 +02:00
Alice Gaudon 79d704083a Add many eslint rules and fix all linting issues 2020-09-28 14:15:22 +02:00
Alice Gaudon b736f5f6cb Improve middleware definition and cleanup code 2020-09-25 22:15:57 +02:00
Alice Gaudon 5dc0bd710a Make nunjucks and static file server compatible with pkg 2020-09-24 22:42:55 +02:00
Alice Gaudon 87aae6bb33 Fix some nunjucks globals not properly set and make getCSRFToken dynamic 2020-09-23 16:11:51 +02:00
Alice Gaudon 47e0756930 Add websocketUrl view local 2020-09-23 12:31:19 +02:00
Alice Gaudon 79d3b51f90 Pass a whole Session to WebSocketListeners 2020-09-23 08:55:35 +02:00
Alice Gaudon dfee2645e1 Express: add custom bind address setting 2020-09-17 21:15:37 +02:00
Alice Gaudon 3af1f4a4e5 Parse json bodies for application/*+json too 2020-08-28 17:40:04 +02:00
Alice Gaudon 25b1e71784 CSRFProtectionComponent: give more room for excluding requests 2020-08-28 16:52:49 +02:00
Alice Gaudon 84f2f7118a Csrf protection test: migrate to supertest 2020-08-05 12:06:21 +02:00
Alice Gaudon 31f974c0a6 Serve static files extra early to avoid useless middlewares execution 2020-07-28 12:11:41 +02:00
Alice Gaudon 3a4755ce98 Give the redirectBack function its own Component back 2020-07-28 10:03:25 +02:00
Alice Gaudon b179afdaf5 nunjucks: override default dump filter to allow circular dependencies 2020-07-26 11:37:36 +02:00
Alice Gaudon 6618e874e0 mail: switch from deprecated TLS usage to STARTTLS 2020-07-20 11:29:10 +02:00
Alice Gaudon fe772c4e14 WebSocketListener: make cookies+session optional 2020-07-19 17:37:10 +02:00
Alice Gaudon 197b963e4c Add cache interface 2020-07-19 12:01:22 +02:00
Alice Gaudon e9a20c82ed Fix chmod check and relax mail 2020-07-15 15:39:08 +02:00
Alice Gaudon 9ce345d99d Don't start in production if important security fields are misconfigured 2020-07-15 15:06:29 +02:00
Alice Gaudon 74dac9b314 Trust loopback proxy 2020-07-15 12:35:14 +02:00
Alice Gaudon eb935bf52a Fix auth redirect_uri chain 2020-07-15 12:31:07 +02:00
Alice Gaudon 634edda704 RedirectBackComponent: fix it and integrate it into NunjucksComponent 2020-07-15 10:24:01 +02:00
Alice Gaudon 6885f3da1c Add configurable maxAge for session cookie, defaults to 30 days 2020-07-14 15:06:46 +02:00
Alice Gaudon 3561614f96 Promote some views to wms-core 2020-07-12 11:47:47 +02:00
Alice Gaudon 172b977fcf Improve reliability of RedirectBackComponent 2020-07-11 12:09:05 +02:00
Alice Gaudon 0e96a285ac Properly split routing in 2 steps: init, handle 2020-07-11 11:46:16 +02:00
Alice Gaudon 4b8a3b307d Integrate file upload form middleware into controllers 2020-07-11 11:08:57 +02:00
Alice Gaudon 6cf153c36b Use gzip compression 2020-07-09 14:18:05 +02:00
Alice Gaudon 6bdfc9b4b7 Add CSRF route excluders 2020-07-08 13:28:22 +02:00
Alice Gaudon 724d59daba Fix core version grabbing 2020-07-08 11:09:27 +02:00