8222 Commits
Author SHA1 Message Date
Jakob Borg ed38528d7f fix: invalid files on remote devices are not "available" (fixes #10943) (#10944)
Properly exclude them from the corresponding query.

Signed-off-by: Jakob Borg <jakob@kastelo.net>
2026-10-27 12:25:15 +01:00
tbodt 9da9c11ef1 feat(api): magic token authentication from syncthing browse (#10810)
Syncthing's authentication options have seemed sort of lacking to me for
a while. I can choose between no authentication (and now the admin
interface is accessible to theoretically every website I visit), or
password authentication (why do I need a password? it's all on one
computer!). This PR adds magic tokens with which the `syncthing browse`
and `syncthing serve` commands can magically log you in.

I hope that adding this and refining it enough will make it eventually
possible to change the default from "zero auth" to "token auth only".

### Testing

Some unit tests, and manually tested using syncthing browser and
syncthing serve, both of which create a token when they open the
browser.

### Documentation

TODO

---------

Signed-off-by: tbodt <tbodt@tbodt.com>
2026-10-27 12:24:30 +01:00
Syncthing Release Automation 70b5bc78ca chore(gui, man, authors): update docs, translations, and contributors 2026-10-26 03:58:06 +00:00
Vandra-Meyer Akos a4a2da477f fix(model): skip ignored folders when auto-accepting (fixes #10935)
Auto-accept ran before the check for ignored folders, so a folder in
the device's ignored folders was still accepted when the device
announced it. After that, the config cleanup removed the ignore entry,
because the folder existed again.

The docs say that an ignored folder is always skipped when the device
announces it. Skip ignored folders in the auto-accept loop too.

Signed-off-by: Vandra-Meyer Akos <akos@lvgl.io>
2026-10-23 07:03:25 +02:00
Jakob Borg d6d0181f7d fix(model): properly compare blocks when reconciling receive-only (fixes #10928) (#10929)
Signed-off-by: Jakob Borg <jakob@kastelo.net>
v2.1.7 v2.1.7-rc.4
2026-10-20 19:54:38 +00:00
Syncthing Release Automation 775573cb2c chore(gui, man, authors): update docs, translations, and contributors 2026-10-19 03:55:11 +00:00
Jakob Borg 2d2ffc160e fix: cap body sizes for incoming requests to public services
Signed-off-by: Jakob Borg <jakob@kastelo.net>
v2.1.7-rc.3
2026-10-18 11:31:39 +02:00
Jakob Borg ab91974876 fix(model): ensure parent ownership is copied properly (fixes #8399) (#10926)
When creating multiple directories, inherit ownership all the way up
(down).

Signed-off-by: Jakob Borg <jakob@kastelo.net>
2026-10-18 11:30:45 +02:00
Jakob Borg f07853b517 fix(model): verify local change before applying metadata shortcut (fixes #10924) (#10925)
Signed-off-by: Jakob Borg <jakob@kastelo.net>
2026-10-18 11:24:47 +02:00
Jakob Borg 7eee65afc6 chore(protocol): add protovalidate validation of incoming messages, reasonable limits (#10838)
This adds pre-validation directly at the unmarshal step, of annotations
added to the protobuf definitions. This seeks to weed out unreasonable
situations early, by ensuring offsets are positive, string lengths are
limited, etc. Some of the limits are a bit subjective, but I think I've
put them above what is expected and reasonable...

---------

Signed-off-by: Jakob Borg <jakob@kastelo.net>
2026-10-18 11:09:03 +02:00
Jakob Borg ab8dcf844e fix(protocol): convert panics on bad data to protocol errors (#10923)
A couple of "panic: bug: foo" type things, where the bug could be
controlled by the supposedly untrusted side.

Signed-off-by: Jakob Borg <jakob@kastelo.net>
2026-10-18 10:45:48 +02:00
Syncthing Release Automation d70d210320 chore(gui, man, authors): update docs, translations, and contributors v2.1.7-rc.2 2026-10-12 04:05:09 +00:00
Jakob Borg a0fd63763f fix(discover): skip unnecessary identical global announce updates; obey retry-after (#10918)
We might send unnecessary updates because something changed by the
actual announcement remains identical; skip those.

---------

Signed-off-by: Jakob Borg <jakob@kastelo.net>
2026-10-09 12:11:30 +02:00
Jakob Borg aff2db883e build(deps): update dependencies (#10917)
Signed-off-by: Jakob Borg <jakob@kastelo.net>
2026-10-09 10:36:49 +02:00
Jakob Borg 5fb192176d fix(sqlite): do not generate unbounded prepared statements (ref #10913) (#10915)
The API can use arbitrary paging parameters, causing arbitrary numbers
of prepared statements, which becomes a memory leak.

Signed-off-by: Jakob Borg <jakob@kastelo.net>
v2.1.7-rc.1
2026-10-07 19:08:43 +02:00
Jakob Borg 84329b277f fix(sqlite): avoid early garbage collection of deleted recv-enc files (#10916)
Signed-off-by: Jakob Borg <jakob@kastelo.net>
2026-10-07 19:07:32 +02:00
Jakob Borg 529ced6c6b fix: handle missing max-sequence file entries (#10912)
This could happen when a folder has deleted files as the latest entries,
and nothing else happened for 180 days (the default tombstone cleanup
time).

Signed-off-by: Jakob Borg <jakob@kastelo.net>
2026-10-07 18:32:44 +02:00
Jakob Borg 6868119860 build: skip defunct loki sending
Signed-off-by: Jakob Borg <jakob@kastelo.net>
2026-10-06 10:02:02 +02:00
Syncthing Release Automation 4461a1ce35 chore(gui, man, authors): update docs, translations, and contributors v2.1.6 2026-10-05 04:03:55 +00:00
Jakob Borg 7ad73b408a fix: remove unnecessary delay in index transmission (#10908)
Prior to refactoring, this delay kicked in once all batches were sent.
Now, it came between each batch. Fix that.

---------

Signed-off-by: Jakob Borg <jakob@kastelo.net>
2026-10-04 06:16:09 +00:00
Jakob Borg 05b6704ef5 fix: use global short lived HTTP client with proper HTTP/2 support (#10901)
In e7b8efb41 I disabled keepalives in several HTTP clients, which
inadvertently also disabled HTTP/2. However, the TLS setup announced h2
as a supported protocol, which caused confusion. This fixes that, and
makes sure to use the same client in all relevant places.

The old option to do usage reporting posts with InsecureSkipVerify goes
away -- nobody should have ever used it.

---------

Signed-off-by: Jakob Borg <jakob@kastelo.net>
v2.1.6-rc.4
2026-09-30 07:05:59 +00:00
Jakob Borg 9bb4747df2 fix(watchaggregator): properly convert floating-point time duration (fixes #10899) (#10900)
Signed-off-by: Jakob Borg <jakob@kastelo.net>
2026-09-30 05:53:20 +00:00
Syncthing Release Automation b223f729c6 chore(gui, man, authors): update docs, translations, and contributors 2026-09-28 03:57:45 +00:00
GiridharandGiridhar 94c3c1cdef fix(gui): improve header and button color contrast (fixes #10488) (#10815)
### Purpose

Improve the contrast of semantic request-dialog headers and buttons in
the light, dark, and black GUI themes.

The light theme keeps its bright semantic colors and uses black text for
success, warning, and danger alerts plus success/warning buttons. Danger
buttons use the existing darker red with white text. The dark themes use
darker success, warning, and danger backgrounds with white text.

The lowest enabled-state contrast ratio is 4.509:1, meeting WCAG AA for
normal text.

### Testing

- `go run build.go assets`
- `go run build.go build syncthing`
- `git diff --check`
- Checked the base and interactive semantic color pairs with a WCAG
contrast calculation; all enabled states are at least 4.5:1.
- Loaded the generated GUI assets in Chromium and verified the computed
foreground/background colors for success, warning, and danger alerts and
buttons in both light and dark themes.

### Screenshots

Rendered light and dark fixtures locally to verify the complete alert
and button combinations. The computed colors matched the intended theme
rules and no clipping or layout changes were introduced.

### Documentation

No documentation changes are required; this only corrects existing theme
colors.

Signed-off-by: Giridhar <giridharpavan593@gmail.com>
Co-authored-by: Giridhar <giridharpavan593@gmail.com>
v2.1.6-rc.3
2026-09-22 14:50:39 +02:00
ShabloneandElias 5c0a725b82 fix(monitor): continue log writes when stdout is unavailable on detached Windows consoles (fixes #10882) (#10889)
### Purpose

#10726 introduces a problematic side effect which only surfaced recently
in #10882:
On Windows 24H2 stdout will be invalid when Syncthing is started
detached from a console. This caused the monitors logwriter to fail
silently before it writes it a log file.
This PR fixes this by letting the multiwriter continue even after
failing on stdout.

### Testing

#10882 can be reproduced without this PRs commit. With this PR logging
does work again.
Following scenarios are tested in which the logfile will be written
again
-console: syncthing.exe
-console: start "" syncthing.exe
-console: start "" syncthing.exe serve --log-file=path
-explorer: double click


`go test ./lib/osutil ` checks if the introduced tolerantMultiWriter
writes to all targets even on errors.

---------

Signed-off-by: Elias <1elias.bauer@gmail.com>
Co-authored-by: Elias <1elias.bauer@gmail.com>
2026-09-22 14:47:41 +02:00
Jakob Borg e7b8efb410 fix: disable keepalive on most outgoing HTTP connections (#10891)
Where we don't expect connection reuse for further requests this reduces
the number of open connection server-side.

Signed-off-by: Jakob Borg <jakob@kastelo.net>
v2.1.6-rc.2
2026-09-22 14:32:44 +02:00
Jakob Borg bb19c017ae fix(model): properly error out when a temp file can't be created (#10883)
Such as when the base filename contains a character disallowed on the
current filesystem...

Signed-off-by: Jakob Borg <jakob@kastelo.net>
v2.1.6-rc.1
2026-09-14 14:46:03 +02:00
Syncthing Release Automation 849798cfc0 chore(gui, man, authors): update docs, translations, and contributors 2026-09-14 03:53:07 +00:00
Jakob Borg 813863cdf4 doc: simplify security reporting note
Signed-off-by: Jakob Borg <jakob@kastelo.net>
2026-09-12 11:11:28 +02:00
Tomasz Wilczyński ece726ce7e fix(gui): add accessible labels to buttons in Edit Device modal (fixes #10873) (#10874)
fix(gui): add accessible labels to buttons in Edit Device modal (fixes
#10873)

Currently, the buttons show text on mouse hover or keyboard focus, but
they are inaccessible to screen readers due to a lack of any readable
labels.

However, there is not enough space to add full-length textual labels
that would be visible to everyone. Therefore, add only aria labels for
screen readers, while keyboard and mouse users can still learn their
function via the tooltips.

Signed-off-by: Tomasz Wilczyński <twilczynski@naver.com>

Signed-off-by: Tomasz Wilczyński <twilczynski@naver.com>
2026-09-12 11:10:39 +02:00
Jakob Borg 466857ae7a fix(model): introducers should not be able to add themselves to folders (#10880)
As documented and intended, introducers should be able to vouch for
folders shared with them, but not other folders.

Signed-off-by: Jakob Borg <jakob@kastelo.net>
2026-09-12 09:09:59 +00:00
Jakob Borg 2ca95cf149 build: give macos security set-key-partition-list the correct password
Signed-off-by: Jakob Borg <jakob@kastelo.net>
v2.1.5
2026-09-08 08:57:55 +02:00
Jakob Borg 62f6060ceb Merge branch 'infrastructure'
* infrastructure:
  chore(discosrv): add debug headers to ping response
  chore(stupgrades): allow templating the asset URL
2026-09-08 08:07:35 +02:00
Jakob Borg c10408263e chore(discosrv): add debug headers to ping response
Signed-off-by: Jakob Borg <jakob@kastelo.net>
2026-09-08 08:06:31 +02:00
Jakob Borg 6c25cdebf6 chore(stupgrades): allow templating the asset URL
Signed-off-by: Jakob Borg <jakob@kastelo.net>
2026-09-08 08:06:31 +02:00
Syncthing Release Automation ed8d87f251 chore(gui, man, authors): update docs, translations, and contributors v2.1.4 2026-09-07 03:52:21 +00:00
Jakob Borg 9af3c75f37 chore: set User-Agent on all outgoing HTTP requests (#10867)
It's only polite, and it enables better troubleshooting in situations
like weird-ass requests to the upgrades download service.

---------

Signed-off-by: Jakob Borg <jakob@kastelo.net>
v2.1.4-rc.2
2026-08-24 18:26:23 +00:00
Syncthing Release Automation e009ec07ff chore(gui, man, authors): update docs, translations, and contributors 2026-08-24 04:29:39 +00:00
Jakob Borg 38ac58c82e build(deps): update dependencies (#10865)
Signed-off-by: Jakob Borg <jakob@kastelo.net>
2026-08-20 11:09:34 +02:00
Jakob Borg 82f3e86424 build: use Go 1.27, minimum version is Go 1.26 (#10864)
### Purpose

🎉

Signed-off-by: Jakob Borg <jakob@kastelo.net>
2026-08-19 20:23:21 +02:00
Jakob Borg 305162e0af Merge branch 'infrastructure'
* infrastructure:
  fix(stdiscosrv): slightly increase reannounce times and smoothing
  fix(stdiscosrv): 500 errors should be accompanied by log entry
  fix(ursrv): data problems are the clients fault
  build: sign docker images
v2.1.4-rc.1
2026-08-18 11:32:52 +02:00
Jakob Borg a907594914 fix(stdiscosrv): slightly increase reannounce times and smoothing
Signed-off-by: Jakob Borg <jakob@kastelo.net>
2026-08-18 11:30:52 +02:00
Jakob Borg db2b02c44d fix(stdiscosrv): 500 errors should be accompanied by log entry
Signed-off-by: Jakob Borg <jakob@kastelo.net>
2026-08-18 11:30:52 +02:00
Jakob Borg 34b3603052 fix(ursrv): data problems are the clients fault
Signed-off-by: Jakob Borg <jakob@kastelo.net>
2026-08-18 11:30:52 +02:00
Jakob Borg bb9dac4f75 build: sign docker images
Signed-off-by: Jakob Borg <jakob@kastelo.net>
2026-08-18 11:28:52 +02:00
Syncthing Release Automation 0fc519fac7 chore(gui, man, authors): update docs, translations, and contributors 2026-08-17 04:01:37 +00:00
Jakob Borg 058bcd7334 fix: open GUI when relaunched instead of printing error (fixes #10727) (#10852)
This is primarily to improve the experience in environments that start
Syncthing from a graphical environment, e.g., Windows.

When already running, instead of printing an error we open the GUI. If
the GUI is not available (but the lockfile indicates we are running),
print an error and exit.

If --no-browser is given or STNOBROWSER is set, act like before.

Closes #10736. Marking as `fix` because this does not deserve to trigger
a minor release on its own.

---------

Signed-off-by: Jakob Borg <jakob@kastelo.net>
2026-08-11 11:17:09 +00:00
Syncthing Release Automation 42ea7231c5 chore(gui, man, authors): update docs, translations, and contributors 2026-08-10 04:17:57 +00:00
Jakob Borg 328d910aee fix(api): correctly return metrics, support bundle (fixes #10847) (#10849)
Our faked request wasn't good enough; improve it, adding a test.

Signed-off-by: Jakob Borg <jakob@kastelo.net>
2026-08-05 18:35:17 +00:00
Jakob Borg d7df27a367 fix(model): correctly handle receive-only changed directories (fixes #8004) (#10843)
When adding a folder in receive-only mode where the contents were
already identical to a remote device, directories would remain as
locally changed when everything else had consolidated. The reason this
happened is that we only did the matching between locally changed files
and their global equivalent for changed items, but directories are
typically not "changed" much as we don't track their mtime, so they
wouldn't pass through this stage when scanning.

Now, instead, do the check when we're anyway walking all the files in
phase two of scanning. This catches all cases of identical items, files
or directories, regardless of how they came to be in the index.

Signed-off-by: Jakob Borg <jakob@kastelo.net>
2026-08-05 20:23:53 +02:00