Commit Graph

4457 Commits

Author SHA1 Message Date
renovate[bot]
b02248bfa6 chore(deps): update dependency pymdown-extensions to v10.17.2
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-05 21:54:54 +01:00
renovate[bot]
89bbd7e302 chore(deps): update dependency @eslint/eslintrc to v3.3.3
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-05 21:52:56 +01:00
renovate[bot]
454650df2c chore(deps): update actions/checkout action to v6.0.1
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-05 21:52:45 +01:00
Erik Michelson
10ec965ed3 fix(renderer): correct regexes for list extra tags
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2025-12-03 19:52:52 +01:00
Erik Michelson
801ef14b7e fix(shutdown): kill server after timeout when hanging on shutdown
When socket.io is not able to close a connection somehow, the code
never reaches the final shutdown state but keeps waiting for all
connections to be closed. This can cause a high CPU load on failing
shutdown. It is very unlikely to happen, except when the server is
shut down exactly at the same time a socket is disconnecting and not
already marked as disconnected. This change adds a fallback timer
which forcefully kills the server after a certain amount of time.

Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2025-12-03 19:52:52 +01:00
Erik Michelson
1028d61bf9 fix(embeddings): replace removed sample PDF file with another one
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2025-12-03 19:52:52 +01:00
Erik Michelson
1c9a5e4283 fix(embeddings): YouTube embedding requires referrer
The embedded YouTube player seemed not to work anymore
and showed a warning "invalid player configuration".
This seems to be related to the iframe being loaded
without a referrer to the origin domain. YouTube
nowadays requires this (probably to track from which
domains a YouTube player is embedded).

See also: https://developers.google.com/youtube/terms/required-minimum-functionality#embedded-player-api-client-identity

Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2025-12-03 19:52:52 +01:00
Philip Molares
bc2075ae9d refactor: use user-token for historyDelete too
Previously, the user token was only used for the endpoint
to delete the user itself. This commit adds that token to
the history deletion as well.

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2025-11-26 19:28:53 +01:00
Erik Michelson
05a937ea22 chore(node): run tests and linting with Node 24 too
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2025-11-26 09:23:29 +01:00
renovate[bot]
c6e2cefa8f chore(deps): update dependency js-yaml to v3.14.2 [security]
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-25 00:32:29 +01:00
renovate[bot]
b77044b591 fix(deps): update dependency body-parser to v2.2.1
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-25 00:20:16 +01:00
renovate[bot]
aa4e83337e chore(deps): update actions/cache action to v4.3.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-25 00:16:02 +01:00
renovate[bot]
0e0eff2b91 chore(deps): update actions/setup-node action to v6
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-25 00:15:07 +01:00
renovate[bot]
afc883acb3 chore(deps): update actions/upload-artifact action to v5
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-25 00:12:47 +01:00
renovate[bot]
4891d4b178 chore(deps): update actions/checkout action to v6
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-25 00:11:31 +01:00
renovate[bot]
d533c3b3d3 fix(deps): update dependency morgan to v1.10.1
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-25 00:02:14 +01:00
renovate[bot]
6ff943b837 chore(deps): update dependency pymdown-extensions to v10.17.1
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-25 00:01:06 +01:00
renovate[bot]
fb67c260f4 chore(deps): update dependency mkdocs-material to v9.7.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-24 23:57:19 +01:00
renovate[bot]
f1c9f11d98 chore(deps): update yarn to v4.12.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-24 23:55:33 +01:00
Erik Michelson
ffc1e5f87d fix(deps): switch back to non-ESM packages
Node 18 has not the ability yet to run the more modern
packages. Since we want to keep Node 18 compatability
around for some time, these packages can't be upgraded.

Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2025-11-24 14:32:24 +01:00
Erik Michelson
389302e6bb chore(deps): upgrade lockfile
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2025-11-24 14:32:24 +01:00
Erik Michelson
9a45d1e2a9 chore(deps): upgrade dependencies, remove some unnecessary ones
This commit upgrades dependencies that are more or less trivial
to update, e.g. because they didn't have major version bumps or
simply didn't break anything. There are some dependencies which
have not been upgraded since this would have required larger
refactorings. This includes especially the markdown-it ecosystem
and the webpack ecosystem.
The largest refactorings in this commit come from the bump of
socket.io v2 to v4 which changed the handling of the connected
socket list for instance.

This commit further removes some outdated and/or unnecessary
dependencies. This includes the String.js library which is
unmaintained for 9 years and has some CVEs. We mainly used
this library for their escapeHTML and unescapeHTML methods.
This can be done using native DOM APIs nowadays, which is also
considered more safe since it is the same logic that the
browser itself uses.
Since we target Node 18 and above, we can also rely on the
built-in fetch function instead of the node-fetch package.
The current version of Chance.js includes a method for
generating a random color now too, so we don't need the
package randomcolor anymore.

Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2025-11-24 14:32:24 +01:00
Erik Michelson
637c451486 fix: use nanoid instead of shortid
shortid is deprecated and they recommend nanoid instead.
We're not sure if this has to do with possible name
collisions or enumerability, but to be sure and on the
safe side, we're changing this. nanoid seems quite safe
since it uses node's crypto module underneath.

Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2025-11-22 01:05:50 +01:00
Thary
c449d3a815 docs(setup): add SelfPrivacy.org as a new community installation method (#6155) 2025-11-21 23:45:08 +01:00
Erik Michelson
4030cbbd3c fix(renderer): update regex for supported link schemes
This commit updates the whitelist we're using for outgoing links from HedgeDoc. Previously, any URI scheme except javascript: could be used as long as it contains two slashes after the scheme (like https://). On the one hand this allowed linking to arbitrary and possibly unsafe URI schemes, on the other hand this breaks some schemes like xmpp: or geo:.
We're now using the list of schemes that can be registered by a browser to be opened. This restricts arbitrary scheme usage but on the other side fixes several other schemes.

Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2025-11-21 21:37:46 +01:00
Erik Michelson
6d970dbafd feat(config): allow restriction and disabling of uploads
Previously, image uploads were always allowed, unless `CMD_ALLOW_ANONYMOUS=false` and `CMD_ALLOW_ANONYMOUS_EDITS=false`.
This PR adds a new config option `CMD_ENABLE_UPLOADS` to configure image uploads independently. There are three different modes: `all` (everyone can upload, guests too), `registered` (only registered and logged-in users can upload images), and `none` to completely disable image uploads.
The default value is non-breaking as it is `all`, unless the config `CMD_ALLOW_ANONYMOUS=false` and `CMD_ALLOW_ANONYMOUS_EDITS=false` is set, in which case the value is `registered`.
The UI will reflect the setting and either show or hide the upload button.

Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2025-11-15 22:54:57 +01:00
Andreas Boesen
78cac1526f docs: improve nginx config docs (#6138, #6149)
Signed-off-by: Andreas Boesen <boesen@belwue.de>
2025-11-12 08:25:21 +00:00
Andreas Boesen
b9ee0b4baa docs: update systemd example (#6147, #6148)
Signed-off-by: Andreas Boesen <boesen@belwue.de>
2025-11-12 09:07:04 +01:00
Achilleas Pipinellis
fd879d43f2 docs: add SQLite example in CMD_DB_URL config (#6119)
Signed-off-by: Achilleas Pipinellis <axilleas@users.noreply.github.com>
2025-09-08 10:25:01 +02:00
Kim Brose
1f586399ac update non-localised strings
Signed-off-by: Kim Brose <2803622+HarHarLinks@users.noreply.github.com>
2025-08-30 00:45:38 +02:00
Erik Michelson
c61bc6a2e0 docs(release-notes): add entry about toobusy bugfix
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2025-08-14 15:31:09 +02:00
Daniel Koschützki
c94ccfb6de fix: Dont return toobusy errors for healthchecks.
If running with an orchestrator that restarts hedgedoc on failing
healthchecks, this causes it to enter a crashloop.

toobusy -> gets restarted -> everyone refreshes -> toobusy

Signed-off-by: Daniel Koschützki <daniel.koschuetzki@adfinis.com>
2025-08-14 15:31:09 +02:00
Lars Kiesow
eba0fc51f0 docs: fix Keycloak Integration Documentation (#6107) 2025-08-14 12:44:44 +00:00
Zachery Faria
8c4b60a13c docs: Cloudflare warning in Reverse Proxy guide (#6105) 2025-08-13 13:53:07 +00:00
renovate[bot]
5fdc09512a chore(deps): update actions/setup-node action to v4.4.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-20 20:57:16 +02:00
renovate[bot]
367626ab9c fix(deps): update dependency formidable to v2.1.3 (master) (#6072)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-20 18:30:14 +00:00
renovate[bot]
c97c11df2c chore(deps): update yarn to v4.9.1 (master) (#6071)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-20 18:02:42 +00:00
renovate[bot]
8dbf77b0a9 chore(deps): update dependency mkdocs-material to v9.6.12 (master) (#6070)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-20 17:58:59 +00:00
Erik Michelson
a27f58396b docs: update release notes
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2025-04-10 00:21:55 +02:00
Erik Michelson
ce66f33a6d feat(config): warning if both saml signing options are disabled
Co-authored-by: Philip Molares <philip.molares@udo.edu>
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2025-04-10 00:21:55 +02:00
Erik Michelson
3f520ea59a refactor(embeds): drop slideshare, use vimeo api, tighten CSP
The slideshare integration was broken for quite a while already,
as slideshare doesn't seem to have a good replacement, we're
dropping it in the same manner as speakerdeck was dropped some
time ago. This means the special syntax now just renders a plain
link. This commit gets rid of the vimdo oembed API too which
allowed JSONP injection. Instead we're using the normal vimeo
video metadata API.

Co-authored-by: Philip Molares <philip.molares@udo.edu>
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2025-04-10 00:21:55 +02:00
Erik Michelson
0636b5c20b refactor: use iframes for gist embedding instead of gist-embed
The used library gist-embed relies on GitHub Gist's JSONP
endpoint which is a risk for XSS injection. By adding untrusted
content from GitHub into the DOM it also follows very bad
practises. Using the iframe embedding has the disadvantage of
not having the proper height for the frame auto-loaded, but
the security benefits are worth it.

Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2025-04-10 00:21:55 +02:00
Erik Michelson
d2585fbd3b fix: set content-disposition and csp header on uploads
This is required since SVG files are able to contain
malicious code through JavaScript and remote embeddings.
When opened in a browser tab, this code would be
executed. However, with these headers in place, there's
no possibility of getting the files to run in the
browser.

Co-authored-by: Philip Molares <philip.molares@udo.edu>
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2025-04-10 00:21:55 +02:00
Erik Michelson
f31e591c17 chore(release): bump version to 1.10.3 and add release notes
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2025-04-10 00:21:55 +02:00
renovate[bot]
86ef650765 chore(deps): lock file maintenance (master) (#6060)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-09 22:21:29 +00:00
renovate[bot]
312950aeeb fix(deps): update dependency body-parser to v2
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-09 21:58:56 +02:00
renovate[bot]
e66f413507 fix(deps): update dependency prometheus-api-metrics to v4
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-09 21:56:58 +02:00
renovate[bot]
d09abac9c6 chore(deps): update dependency globals to v16
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-09 21:55:39 +02:00
renovate[bot]
a0c50164b6 chore(deps): update linters
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-09 21:49:35 +02:00
Erik Michelson
cc74351846 feat(saml): add config options to set required signings
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2025-04-09 21:49:00 +02:00