25 Commits
Author SHA1 Message Date
Daniel Hiller de4d768831 fix: close the gaps a security review found in the default install
Reported against 2.2.1 by someone reading the source. Every finding held.

**Sign-in had no ceiling.** Failures were logged with the caller's address
and nothing more. Two counters now — one per address, one per account —
because the two attacks look different: one source working through many
accounts is caught by the first, many sources working on one account by the
second, and behind a proxy only the second still means anything.

The count is kept in the process that serves the request. PLANKA needs no
Redis and the stock deployment is one container; run several and each keeps
its own count, which multiplies the ceiling by their number. That trade is
written where the limits are configured.

**The second factor could be guessed at leisure.** Six digits, and a
pending token that stayed valid for its full ten minutes however many codes
were wrong. Wrong codes are now counted on the session row — in the
database, so the count survives a restart and holds across every process —
and when the budget is spent the session is destroyed. After that even the
right code is refused and the login starts over from the password.

**Avatars, background images and favicons** checked the token's signature
and nothing else, so a revoked session, a deactivated account or a changed
password all kept working there for as long as the signature lasted, which
is a year by default. The five checks the API makes now live in one helper
that both use, rather than the shortened copy that had drifted from it.

**A link attachment's favicon** was fetched from wherever the URL pointed.
Storing a link is harmless — it is a string the user typed — but fetching
its icon is a request the server makes to an address the user chose, and
whether an icon came back reported on what is reachable from inside the
network. Server-side fetches now refuse private, loopback and link-local
addresses, `169.254.169.254` among them. The attachment is still created:
linking to an internal wiki is a legitimate thing to do, and it was the
server's own request that had to stop.

**The signing key.** Our own compose file ships `notsecretkey`, and it is
printed in the documentation — so on any instance that copied it, anyone can
sign a token for any account. PLANKA now says so on every start, and keeps
saying it, along with a key that is missing or shorter than 32 characters.
The placeholder carries the warning inline, where it is copied from.

**The backup script** wrote password hashes, live sessions, TOTP secrets and
SMTP credentials to an unencrypted archive. `BACKUP_PASSPHRASE` now encrypts
it, and without one the script says what it just put on disk. It also says
what it is — an example for the stock compose stack, not a backup concept —
and names the window between the database dump and the file copy, which no
ordering closes.
2026-08-28 20:55:54 +02:00
Maksim Eltyshev db99227f32 feat: Re-stream static files from S3, introduce protected static files 2026-01-30 21:45:18 +01:00
Maksim Eltyshev 208e61a272 feat: Optimize and parallel image processing 2025-12-19 19:11:02 +01:00
Maksim Eltyshev fb5d5233bf feat: Improve mime type detection, limit image processing size 2025-12-19 17:24:22 +01:00
Maksim Eltyshev 12f388fd35 fix: Fix attachment file handling when S3 is enabled 2025-12-11 19:26:55 +01:00
Maksim Eltyshev 4d77a1f596 feat: Track storage usage 2025-08-23 00:03:20 +02:00
Maksim Eltyshev 9d07178e57 fix: Move webhooks declaration to correct position 2025-07-08 00:22:24 +02:00
Maksim Eltyshev b22dba0d11 feat: Move webhooks configuration from environment variable to UI 2025-07-04 22:04:11 +02:00
Maksim Eltyshev 2ee1166747 feat: Version 2
Closes #627, closes #1047
2025-05-10 02:09:06 +02:00
Maksim Eltyshev be9dd30cd1 ref: Rename folder to dir for consistency 2024-11-12 17:07:04 +01:00
Maksim Eltyshev 97f4c0ab0d fix: Secure S3 attachments, bump SDK, refactoring
Closes #673
2024-11-12 15:58:22 +01:00
Nguyễn Hải Quang f20a3d50f5 feat: Add S3 support for uploads (#938) 2024-11-11 14:59:18 +01:00
Maksim Eltyshev 369bee63b1 fix: Include previous data state in webhook
Closes #809
2024-10-31 00:48:49 +01:00
Maksim Eltyshev e7b3612c2e fix: Preserve extension for attachments with long filename
Closes #77
2024-09-16 00:45:53 +02:00
Maksim Eltyshev 87683fe523 feat: Webhooks configuration, all events support, refactoring 2024-06-12 00:51:36 +02:00
HannesOberreiter 193daf6cfb feat: Events via webhook (#771)
Closes #215, closes #656
2024-06-06 20:22:14 +02:00
Maksim Eltyshev 6fd42e3b62 fix: Preserve orientation of images
Closes #384
2023-01-17 22:14:39 +01:00
Maksim Eltyshev 0ad9cffb08 fix: Improve quality of resized images 2022-12-26 22:43:21 +01:00
Maksim Eltyshev 5cd025ffb7 ref: Remove board types, refactoring 2022-12-26 21:10:50 +01:00
Maksim Eltyshev 9db355f331 fix: Fix image size for animated attachments 2022-12-24 02:59:03 +01:00
Maksim Eltyshev 05b57142f9 feat: Preserve original format of images, change interpolation kernel
Closes #349
2022-12-24 00:47:59 +01:00
Maksim Eltyshev e4258eda9b fix: Use move-file instead of rename 2022-08-26 16:02:47 +02:00
Maksim Eltyshev 542c4a845c fix: Change mechanics of file uploading 2022-08-26 02:45:27 +02:00
Maksim Eltyshev 39fec45a7f ref: Collapse image data into one column 2022-06-21 12:01:41 +02:00
Maksim Eltyshev fe91b5241e Project managers, board members, auto-update after reconnection, refactoring 2021-06-24 01:05:22 +05:00