Commit Graph

4438 Commits

Author SHA1 Message Date
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
renovate[bot]
639eee078d chore(deps): update dependency globals to v15.15.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-09 21:48:01 +02:00
renovate[bot]
3b9a8297c2 fix(deps): update dependency validator to v13.15.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-09 21:47:49 +02:00
renovate[bot]
e38ba23bc9 fix(deps): update dependency file-type to v20.4.1
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-09 21:46:43 +02:00
renovate[bot]
49c6d7f75f fix(deps): update dependency mysql2 to v3.14.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-09 21:46:05 +02:00
renovate[bot]
5ec6487f17 fix(deps): update dependency pg to v8.14.1
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-09 21:45:45 +02:00
renovate[bot]
4c3ff41385 fix(deps): update dependency helmet to v8.1.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-09 21:44:29 +02:00
renovate[bot]
53076a665a fix(deps): update dependency uuid to v11.1.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-09 21:43:39 +02:00
renovate[bot]
894efa88d1 fix(deps): update dependency compression to v1.8.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-09 21:42:15 +02:00
renovate[bot]
c6df2629d3 chore(deps): update yarn to v4.9.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-09 21:41:47 +02:00
renovate[bot]
9ece354c70 chore(deps): update dependency less to v4.3.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-09 21:41:16 +02:00
renovate[bot]
ae85d372a4 chore(deps): lock file maintenance (master) (#6056)
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 19:41:09 +00:00
renovate[bot]
543fb4feb4 chore(deps): update dependency prismjs to v1.30.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-09 21:39:45 +02:00
renovate[bot]
e08feadde7 fix(deps): update dependency mariadb to v3.4.1 (master) (#6043)
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 19:37:28 +00:00
renovate[bot]
4f63cb4ec0 chore(deps): update actions/setup-node action to v4.3.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-09 21:36:15 +02:00
renovate[bot]
7d38e100b8 chore(deps): update dependency jquery-mousewheel to v3.2.2
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-09 21:35:12 +02:00
renovate[bot]
7e832cc408 chore(deps): update dependency mkdocs-material to v9.6.11 (master) (#6038)
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 19:34:17 +00:00
renovate[bot]
1259ff0edc fix(deps): update dependency @node-saml/passport-saml to v5.0.1 (master) (#6039)
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 19:34:05 +00:00
renovate[bot]
80ce58e316 chore(deps): update actions/cache action to v4.2.3 (master) (#6037)
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 19:33:53 +00:00
renovate[bot]
9f98e9701e chore(deps): update dependency esbuild-loader to v4.3.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-09 21:29:12 +02:00