Commit Graph
65 Commits
Author SHA1 Message Date
kolaente 1ce3df2d60 refactor(imageutils): queue decodes on the caller's context
Address pr-swarm finding: avatar, background and OIDC/LDAP decodes passed
context.Background(), so a disconnected client stayed queued for up to 30s.
2026-10-20 23:05:30 +02:00
kolaente eaecaa53fe fix(oidc): bound avatar decode memory
Identity-provider avatars are cropped through imageutils.Decode. When the
server is busy the avatar is skipped and logged, like any other avatar
sync error, so the login still succeeds.
2026-10-20 23:05:30 +02:00
kolaente 672133a7e3 test(utils): preserve seconds when stripping nanoseconds 2026-09-30 23:26:55 +02:00
kolaente 7adf63e4a6 test(utils): assert avatar crop source pixels 2026-09-30 23:26:55 +02:00
kolaente 095eb2c1b1 test(utils): preserve fractional duration components 2026-09-30 23:26:55 +02:00
kolaente 3f547976f8 fix(config): migrate deprecated webhooks.* keys after loading the config
The migration to outgoingrequests.* ran while setting defaults, before
the config file and environment were read, so it only ever saw default
values. webhooks.proxyurl, webhooks.proxypassword and
webhooks.allownonroutableips have been ignored since they were
deprecated.
2026-09-30 20:45:07 +02:00
kolaenteandTink 1bf93c58aa refactor(utils): rename NewHTTPClient to NewUnguardedHTTPClient
Address review comment: make the missing SSRF guard obvious at the call site
2026-09-30 18:26:56 +02:00
kolaenteandTink bff05f2377 fix(utils): stop exempting direct requests to the proxy address from the SSRF guard
The proxy dial exemption was keyed on addresses learned lazily from earlier
proxied requests, so a direct request (loopback, NO_PROXY or an unproxied
scheme) or a redirect to the proxy's host:port was dialed unguarded. Derive
the exempt addresses once from the configured or environment proxy URLs and
reject direct requests to them with ssrf.ErrProhibitedIP.

Address pr-swarm finding: SSRF guard bypass via the proxy address
2026-09-30 18:26:56 +02:00
kolaenteandTink dae98ce948 fix(utils): use the configured proxy without a password
outgoingrequests.proxyurl was silently ignored unless proxypassword was
set too, and the username was hardcoded to vikunja. Credentials in the
proxy url are used now, with proxypassword as the mole-compatible
fallback. Plain http requests through the proxy now authenticate too,
not only CONNECT tunnels. An unparseable proxy url fails requests
instead of connecting directly.
2026-09-30 18:26:56 +02:00
kolaenteandTink ea19fcafe4 refactor(utils): split proxy-aware client from the SSRF guard
NewHTTPClient carries the proxy and timeout settings without the SSRF
guard, for admin-configured endpoints like OIDC providers that often
live on a private network. NewSSRFSafeHTTPClient builds on it.
2026-09-30 18:26:56 +02:00
kolaenteandTink dd52c36dd1 fix(utils): exempt the proxy dial from the SSRF guard
Outgoing proxies usually live on a private network, so the SSRF guard
refused to connect to them unless allownonroutableips was enabled,
which disabled the guard for direct connections too. Only the dial to
the configured proxy skips the guard now; proxied targets are resolved
by the proxy.
2026-09-24 18:06:12 +02:00
kolaenteandTink a741f93f22 fix(utils): honor proxy env vars for outgoing requests
The SSRF-safe client used a bare http.Transport, so HTTP_PROXY,
HTTPS_PROXY and NO_PROXY were ignored. Clone the default transport and
read the proxy from the environment when outgoingrequests.proxyurl is
not set.
2026-09-24 18:06:12 +02:00
kolaente 40d95182fc fix(images): bound decode and resize dimensions
Decoding now validates image dimensions before allocating pixels
(imaging.Fit replaces unbounded Resize so neither side can blow up),
backgrounds decode once and reuse the image for the blur hash, and
DownloadImage is bounded at the configured max file size. Small sources
now keep their native size (Fit does not upscale); the frontend scales
via CSS.
2026-08-31 18:37:03 +02:00
kolaente 4655496e2e feat(migration): client-aware get and size-limited download helpers, bounded json decode
Migrators that talk to a user-supplied host need a client with a redirect
policy, a cap on response bodies and no retries on permanent errors
(utils.ErrDoNotRetry). Diagnostic body reads in the shared helpers are capped.
2026-08-20 08:45:42 +02:00
kolaente 3a0ea15d8c fix(security): hash password-reset, email-confirm and deletion tokens at rest (GHSA-r6w9-259g-gwrv) 2026-07-19 18:59:34 +02:00
TowyTowyandGitHub ffcd470adf fix(caldav): parse ISO 8601 week durations in reminder triggers (#3183) 2026-07-18 18:55:17 +02:00
Rhys McNeillandkolaente 699c766049 fix: add timeouts to Gravatar, Unsplash, and SSRF-safe HTTP clients 2026-04-09 07:31:08 +00:00
kolaenteandkolaente cc22acdf3e chore(lint): suppress gosec false positives on SSRF-safe HTTP client calls 2026-03-23 16:34:22 +00:00
kolaenteandkolaente e5a1c05771 refactor: use shared SSRF-safe HTTP client in webhook code 2026-03-23 16:34:22 +00:00
kolaenteandkolaente 363aa66423 fix: prevent SSRF via OpenID Connect avatar download (GHSA-g9xj-752q-xh63) 2026-03-23 16:34:22 +00:00
kolaenteandkolaente 0266fffad2 feat: add shared SSRF-safe HTTP client utility 2026-03-23 16:34:22 +00:00
kolaente 2053426062 chore(lint): suppress known gosec false positives
Add config-level exclusions for G117 (secret-named struct fields),
G101 in test files, G702/G704 in magefile, and goheader in plugins.
Add inline #nosec comments for specific G703/G704 false positives
in export, dump/restore, migration, and avatar code.
2026-03-23 16:23:15 +01:00
kolaente bbe1a2bbd0 refactor(utils): extract ContainsPathTraversal to shared utils package 2026-02-25 13:01:00 +01:00
acbf751ba0 feat(doctor): add user namespace detection and improved storage diagnostics (#2180)
This PR adds support for detecting and handling Linux user namespaces (commonly used in rootless Docker containers) and improves error diagnostics when file storage validation fails.

Docs PR: https://github.com/go-vikunja/website/pull/289

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-02-01 11:57:35 +01:00
kolaenteandGitHub 731b7c3001 fix: avoid mutating global http.DefaultClient in webhook proxy (#2145)
Fixes a bug where the webhook HTTP client was mutating `http.DefaultClient` (the global singleton), causing ALL HTTP requests in the application to use the webhook proxy. This broke OIDC authentication and other external HTTP calls when webhook proxy was configured.

Fixes #2144
2026-01-24 13:58:47 +01:00
kolaente c6fe4c1a6e fix(auth): retry up to three times when an auth provider cannot be reached
Resolves https://github.com/go-vikunja/vikunja/issues/2050
2026-01-05 21:50:40 +01:00
kolaenteandGitHub 541a38456e chore(deps): update golangci-lint to 2.6.0 (#1737) 2025-10-31 17:28:52 +00:00
Dominik Pschenitschniandkolaente d48d88d442 fix: comment typo and misspellings 2025-07-02 17:46:21 +02:00
Weijie ZhaoandGitHub a214d68a44 feat(auth): sync avatar from OpenID providers (#821) 2025-06-16 15:59:31 +02:00
Dominik PschenitschniandGitHub 296577a875 fix: correct license header references (#882)
See originals:
- https://www.gnu.org/licenses/agpl-3.0.txt
- https://www.gnu.org/licenses/gpl-3.0.txt
2025-06-10 12:18:38 +02:00
kolaente d16d13d730 feat(i18n): use plural translations in humanize duration 2025-05-16 21:57:07 +02:00
kolaenteandGitHub 4d8c17f577 feat(i18n): make overdue reminder translations more explicit (#761) 2025-05-13 11:12:56 +00:00
kolaente f7229ba647 fix(i18n): translate all parts of reminder notifications 2025-05-12 16:24:20 +02:00
kolaente 13d4e0e00d chore(utils): remove deprecated MakeRandomString function 2025-03-24 16:52:46 +01:00
kolaente 80d22d5060 fix(colors): truncate longer hex color values
Resolves https://vikunja.sentry.io/share/issue/6f1e37d4b8b248188e20650234a45cde/
2024-09-30 20:06:10 +02:00
kolaente 4ff8815fe1 fix(subscriptions): cleanup and simplify fetching subscribers for tasks and projects logic
Vikunja now uses one recursive CTE and a few optimizations to fetch all subscribers for a task or project. This makes the relevant code easier to maintain and more performant.
2024-09-04 19:55:17 +02:00
viehliebandkonrad ed4da96ab1 feat: assign users to teams via OIDC claims (#1393)
This change adds the ability to sync teams via a custom openid claim. Vikunja will automatically create and delete teams as necessary, it will also add and remove users when they log in. These teams are fully managed by Vikunja and cannot be updated by a user.

Co-authored-by: kolaente <k@knt.li>
Reviewed-on: https://kolaente.dev/vikunja/vikunja/pulls/1393
Resolves https://kolaente.dev/vikunja/vikunja/issues/1279
Resolves https://github.com/go-vikunja/vikunja/issues/42
Resolves https://kolaente.dev/vikunja/vikunja/issues/950
Co-authored-by: viehlieb <pf@pragma-shift.net>
Co-committed-by: viehlieb <pf@pragma-shift.net>
2024-03-02 08:47:10 +00:00
kolaente c05f51b923 chore(deps): update golangci-lint rules 2023-12-19 13:34:31 +01:00
kolaente a1ea77f751 feat: accept hex values which start with a # 2023-10-24 16:12:22 +02:00
kolaente e4c71123ef fix: lint 2023-09-01 08:39:25 +02:00
kolaente c88cbaa973 feat(api tokens): properly hash tokens 2023-09-01 08:36:11 +02:00
kolaente e518fb1191 chore: remove year from copyright headers
Resolves https://kolaente.dev/vikunja/api/pulls/1483
2023-09-01 08:32:28 +02:00
Dominik Pschenitschni 5856f21f31 chore: fix comment url 2023-04-11 11:40:06 +02:00
f45648a6f7 feat(caldav): Sync Reminders / VALARM (#1415)
Co-authored-by: ce72 <christoph.ernst72@googlemail.com>
Co-authored-by: kolaente <k@knt.li>
Reviewed-on: https://kolaente.dev/vikunja/api/pulls/1415
Reviewed-by: konrad <k@knt.li>
Co-authored-by: cernst <ce72@noreply.kolaente.de>
Co-committed-by: cernst <ce72@noreply.kolaente.de>
2023-04-01 11:09:11 +00:00
kolaente 349e6a5905 feat: rename lists to projects 2023-03-13 14:28:06 +01:00
kolaente 9f14466dfa fix: lint 2023-03-05 22:24:29 +01:00
kolaente 8869adfc27 feat: add setting to change overdue tasks reminder email time 2022-06-16 16:20:26 +02:00
kolaente 5cf263a86f feat: upgrade golangci-lint to 1.45.2 2022-03-27 16:55:37 +02:00
konrad 90146aea5b User Data Export and import (#967)
Co-authored-by: kolaente <k@knt.li>
Reviewed-on: https://kolaente.dev/vikunja/api/pulls/967
Co-authored-by: konrad <k@knt.li>
Co-committed-by: konrad <k@knt.li>
2021-09-04 19:26:31 +00:00
andreymalandkonrad 50b49ffab6 Add support of Unix socket (#912)
Reviewed-on: https://kolaente.dev/vikunja/api/pulls/912
Reviewed-by: konrad <konrad@kola-entertainments.de>
Co-authored-by: andreymal <andriyano-31@mail.ru>
Co-committed-by: andreymal <andriyano-31@mail.ru>
2021-07-08 08:13:01 +00:00