Commit Graph

4467 Commits

Author SHA1 Message Date
Philip Molares
f51e402a48 docs: update release-checklist
The 1.10.4 release taught us a few new things. They are documented
now.

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2025-12-05 23:45:35 +01:00
Erik Michelson
0a5f4ccefd docs: update for release 1.10.4
Co-authored-by: Philip Molares <philip.molares@udo.edu>
Signed-off-by: Philip Molares <philip.molares@udo.edu>
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2025-12-05 23:36:12 +01:00
Erik Michelson
92522e3f33 fix(deps): downgrade formidable to v2 to fix uploads
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2025-12-05 23:36:12 +01:00
Erik Michelson
35f36fccba fix(auth): add state parameters and PKCE support
Only the OAuth2 auth strategy was using the state parameter,
which should be used as described in the RFC. The other
auth strategies such as GitHub, GitLab or Google were lacking
the state parameter.
This change adds the required state parameter as well as
enabling PKCE support on providers where it's possible.

Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2025-12-05 22:06:30 +01:00
renovate[bot]
53f2ada7a3 chore(deps): lock file maintenance
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-05 22:02:12 +01:00
renovate[bot]
b6ab3e0c16 fix(deps): update dependency cookie to v1.1.1
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-05 21:59:07 +01:00
Erik Michelson
ef724d0fc2 fix(renderer): use credentialless and sandbox attributes on iframes
Websites loaded via an iframe could interrupt the user's workflow by initiating certain actions like opening print dialogs, alert boxes, etc. on the user's browser or even initiate file downloads.
By using the sandbox attribute, the iframe is limited in it's actions and can't access browser APIs such as to download files.
With the additional credentialless attribute, the page in the iframe is loaded in a completely separate browsing context on Chromium-based browsers, thus isolating the content even more.
The functionality could previously be abused to initiate certain actions on 3rd-party websites where the user is logged-in, if these 3rd-party websites have no proper CSRF protection. However, this is not a security risk to HedgeDoc itself.

Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2025-12-05 21:57:19 +01:00
renovate[bot]
61e3421697 chore(deps): update actions/setup-node action to v6.1.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-05 21:56:52 +01:00
renovate[bot]
de2498e854 fix(deps): update dependency express to v4.22.1
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-05 21:56:29 +01:00
renovate[bot]
cca19aa159 fix(deps): update dependency connect-session-sequelize to v8.0.4
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-05 21:55:36 +01:00
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