Commit Graph

6949 Commits

Author SHA1 Message Date
Erik Michelson f0095cd8ec feat(config): make max upload size configurable
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2026-02-04 21:36:52 +01:00
Erik Michelson a326939f70 fix(config): ensure session secret is always min 32 bytes long
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2026-02-04 21:36:52 +01:00
Erik Michelson ac2255579f refactor(backend): switch from express to fastify
Fastify is a more modern web framework than express. Although it
shares almost the same API it has a way better performance and
supports more modern features. Several modules like csurf for
CSRF-protection aren't maintained for express anymore but there
is a Fastify replacement.

Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2026-02-04 21:36:52 +01:00
Philip Molares bb89f89af7 chore: fix types for diff
As diff uses its own types now, we need to adapt the code to use those

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2026-01-22 00:39:47 +01:00
Philip Molares c2300c09ea chore: remove @types/diff
As diff brings it own types now we don't need @types/diff not anymore

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2026-01-22 00:39:47 +01:00
renovate[bot] e252c40e3d fix(deps): update dependency diff to v8 [security]
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-22 00:39:47 +01:00
Erik Michelson 1cf3cb15af chore(docs): update ESDocs to match changes
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2026-01-22 00:39:20 +01:00
Erik Michelson f402757baf fix(alias): always return aliases in order from the database
This makes tests behave consistently and makes the API more
predictable. Furthermore, this could reduce the requirement
for client-side sorting in the modal.

Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2026-01-22 00:39:20 +01:00
Philip Molares 0ef59950a6 feat(realtime): add alias update message
This allows us to communicate to the clients that everybody should update their aliases.

This route allows us to get all aliases of a note

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2026-01-22 00:39:20 +01:00
Philip Molares eef4d9ed87 feat(private): add alias/:alias
This route allows us to get all aliases of a note

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2026-01-22 00:39:20 +01:00
Philip Molares 305f0afc5a feat(realtime): add permissions updated message
This allows us to communicate to the clients that everybody should update their note permissions.

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2026-01-22 00:39:20 +01:00
Philip Molares dbf102efe7 feat(private): add notes/:noteAlias/metadata/permissions route
This route should be used to get only the permissions of a specific note.
It's useful when we update the permissions and only want to get an update for that.

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2026-01-22 00:39:20 +01:00
Erik Michelson 97ed67292d fix(register): do not show invalid "You can log in now" message
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2026-01-21 22:19:35 +01:00
Erik Michelson 8fce75edd9 fix(login): right error messages on login failures
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2026-01-21 22:19:35 +01:00
Erik Michelson 3c668d0ba6 refactor(login): use one common username/password login component
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2026-01-21 22:19:35 +01:00
Erik Michelson 4099c4aa4e fix(register): fallback image in user avatar selection
Previously, the method to generate the fallback image returned the
image given by the auth provider, if existing. It now includes a
new flag to foce the generation of a fallback image.

Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2026-01-21 22:19:35 +01:00
Erik Michelson f999dd31e2 fix(oidc): use correct username field name
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2026-01-21 22:19:35 +01:00
Erik Michelson 398d1d5169 fix(register): show info about min password length
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2026-01-21 22:19:35 +01:00
renovate[bot] a023f4a3cc fix(deps): update i18next
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-21 19:17:40 +01:00
Philip Molares d58ac4b454 refactor: showErrorNotification is actually a builder
This function actually takes an error and builds the notification.
This new name makes the usage of the function more clear.

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2026-01-15 01:35:58 +01:00
Philip Molares 05a2d2657a fix(permissions): add more detailed error messages
The user should be informed what went wrong instead of just "an error occurred"

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2026-01-15 01:35:58 +01:00
Philip Molares 741d4d7239 refactor(permissions): clear username after adding permissions
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2026-01-15 01:35:58 +01:00
Philip Molares dcd7b77cd5 fix: add cancel button to media delete dialog
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2026-01-15 01:27:50 +01:00
Philip Molares 705b74183d fix(imports): api/notes
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2026-01-14 21:48:08 +01:00
Philip Molares d27ea8381f fix(changePassword): improve error messages
The user should understand what they did wrong

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2026-01-14 21:48:08 +01:00
Philip Molares b70f5e5919 feat: add auth constants
This adds constants for
- MIN_USERNAME_LENGTH
- MAX_USERNAME_LENGTH
- MIN_PASSWORD_LENGTH

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2026-01-14 21:48:08 +01:00
Philip Molares ec134101a4 chore: add docker compose for auth provider
Add ldap tes server to allow to easily work with that

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2026-01-14 21:22:11 +01:00
Erik Michelson 77dc9f731e fix(ci): update workflow for oxlint and oxfmt usage
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2026-01-14 19:46:27 +01:00
Erik Michelson 5574d23889 chore(format): reformat using oxfmt
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2026-01-14 19:46:27 +01:00
Erik Michelson 5b0f3a1c55 chore(format): migrate from prettier to oxfmt
oxfmt is a project from the OXC toolchain, similar to OXLint.
It is based on the Rust-built 'oxidation compiler' and has
increased performance compared to Prettier which is built
in plain JS.

Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2026-01-14 19:46:27 +01:00
Erik Michelson 13cdaf066e chore(ide): add OXC plugin to WebStorm IDE project plugin list
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2026-01-14 19:46:27 +01:00
Erik Michelson 5abc428903 chore(lint): fixes according to stricter lint rules
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2026-01-14 19:46:27 +01:00
Erik Michelson a880864b2c chore(lint): replace ESLint with OXLint for performance
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2026-01-14 19:46:27 +01:00
Erik Michelson 51407598d9 fix(test): remove warning about isolatedModules in ts-jest diagnostics
This warning spams the output and currently is not critical to us.
Setting `isolatedModules: true` in the tsconfig.json as suggested breaks
the module resolution and imports.

Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2026-01-12 18:34:31 +01:00
Erik Michelson 69ba5c5b8b fix(config): remove invalid logger, that causes a crash in Node 24
This logger statement contains the complete noteConfig.error object which includes
circular object dependencies. Since Node 24 has a rewritten implementation of
console.log that does not silently ignore such errors anymore, we have to remove
this statement. It probably was a leftover from debugging anyways, since the proper
error message is constructed later on and then displayed.

Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2026-01-12 18:34:31 +01:00
Erik Michelson 936b583b12 fix(tsconfig): revert to ES2023 instead of ES2024 for ts-jest compatibility
The updated @tsconfig/node24 package uses ES2024 as default feature set for
ECMAScript. Since ts-jest and probably also @typescript-eslint/parser do not
support ES2024 yet, this is a simple fix. We didn't use any ES2024 features
anyways.

Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2026-01-12 18:34:31 +01:00
Erik Michelson 941cf87c86 chore(deps): upgrade better-sqlite3 to v12
This is required since better-sqlite3 added support
for Node 24 since version 12.0.0

Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2026-01-12 18:34:31 +01:00
Philip Molares e087a9b336 chore: update node to 24.12.0
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2026-01-12 18:34:31 +01:00
Erik Michelson 68e78afa6b fix(realtime): use correct Buffer/ArrayBuffer/Uint8Array conversion
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2026-01-12 17:32:03 +01:00
Erik Michelson bde357c8a0 chore(deps): update @types/node to 20.19.28
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2026-01-12 17:32:03 +01:00
Philip Molares db64b4947b fix(realtime): correctly handle ArrayBuffer
We can just create a big enough ArrayBuffer and create a Uint8Array view
on this buffer to save the data into.

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2026-01-12 17:32:03 +01:00
Philip Molares 73bd1d3937 fix(markdown-it-plugins): import of MarkdownIt
Apparently we need to specify the index.js file now instead of
just pointing to the folder.

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2026-01-12 17:32:03 +01:00
renovate[bot] f3cb59aa2b chore(deps): update dependency typescript to v5.9.3
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-12 17:32:03 +01:00
Erik Michelson e85320d623 fix(docker): use correct tsconfig path and turbo args
The docker build seemed to fail because the tsconfig
for the backend pointed to an out-of-date path, that
didn't exist anymore. Furthermore, the --no-cache
directive was deprecated and should be replaced by
explicitly stating the caching mode for local and
remote cache (empty policy means no caching).

Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2026-01-12 09:46:41 +01:00
Erik Michelson af0365d9ad fix(docker): remove bash-dependencies from build script
The build script for the backend relied on some bash specifics.
Since bash is not available in alpine based node docker images,
building failed. This commit replaces bash functions with the
native POSIX equivalents.

Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2026-01-12 09:46:41 +01:00
Erik Michelson 4b8b36ab76 fix(docker): replace deprecated ENV declarations in Dockerfile
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2026-01-12 09:46:41 +01:00
Erik Michelson 5afceb6884 docs(explore): add missing ESDoc comments
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2026-01-11 20:21:00 +01:00
Erik Michelson b75296780f chore(explore): linting fixes
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2026-01-11 20:21:00 +01:00
Erik Michelson 849807fcaf fix(explore): MariaDB expects named subqueries
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2026-01-11 20:21:00 +01:00
Philip Molares 0a34f11e29 test(explore): allow some notes to be publiclyVisible
For our testing it necessary to allow some notes to be publicly visible

Co-authored-by: Erik Michelson <github@erik.michelson.eu>
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2026-01-11 20:21:00 +01:00