aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2024-03-11build(deps): bump google.golang.org/protobuf from 1.32.0 to 1.33.0dependabot/go_modules/google.golang.org/protobuf-1.33.0dependabot[bot]
Bumps google.golang.org/protobuf from 1.32.0 to 1.33.0. --- updated-dependencies: - dependency-name: google.golang.org/protobuf dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
2024-03-11lib/model: Don't bump seq on error in index handler (#9459)v1.27.5-rc.1Simon Frei
2024-03-10lib/model: Prevent infinite index sending loop (fixes #9407) (#9458)Simon Frei
Explanation of what/why in a code comment. Fixes https://github.com/syncthing/syncthing/issues/9407
2024-03-05lib/scanner: Fix ticker leak in scanner (fixes #9417) (#9451)Simon Frei
Move the ticker closer to where it's used and defer stop it to avoid missing a branch. Fixes regression introduced in https://github.com/syncthing/syncthing/commit/2f3eacdb6c1c33650ccdd91f42e842c116200d92 Fixes https://github.com/syncthing/syncthing/issues/9417
2024-03-04build: Update dependencies (#9448)Jakob Borg
2024-03-04gui, man, authors: Update docs, translations, and contributorsSyncthing Release Automation
2024-03-03gui: Show encryption status for devices sharing folder (ref #8808) (#9355)André Colomb
This re-implements the stalled enhancement from #8808. Thanks @Craeckie for the idea and first implementation draft! If a folder is shared to a device with encryption, add a lock icon in front of the device name under "Shared With" in the folder details panel. Be careful not to add whitespace caused by line wraps in HTML source code, which would defeat the purpose of keeping the icon glued to the name by a non-breaking space. Apply the same lock icon for the list of folders shared with a device.
2024-03-03gui: Fix wrapping in "Shared With" / "Folders" lists. (#9438)André Colomb
This change was split off from #9355 as an independent clean-up / fix. See that PR for review discussion, testing, and screenshots. Improve the wrapping of folder labels / device names by going back to word-wrapping, but making sure other spans, such as the trailing comma, do not get separated from the label span. * Avoid adding whitespace caused by line wraps in HTML source code. The different cases within the ng-switch block are separated by newlines for readability, but that gets parsed as whitespace. For wrapping purposes, this should not happen, because then there is no way to keep other HTML parts glued to the name / label in each list entry. * Simplify redundant conditional comma code. The separating comma after a device name or folder label (all but the last) should always stick to it. Use the HTML comment trick to avoid whitespace and therefore a wrapping opportunity caused by the code formatting newline. Thus the conditional comma only needs to be defined once, not in each ng-switch case. * Wrap at word boundaries and only break up words if necessary. Use the overflow-wrap: break-word; style instead of word-break: break-all;. While the latter is suitable for longish paths, breaking device names or folder labels arbitrarily within words is ugly. This also makes the the <sup> numbers actually stay glued to their respective neighboring words. Include legacy CSS alias "word-wrap" in the class definition. * Fix indentation (unrelated).
2024-03-02github: Convert issue templates into forms (fixes #9442)Jakob Borg
2024-03-02lib/model: Ignore difference in extended attributes & ownership when ↵Luke Hamburg
deleting (fixes #9371) (#9430) Adds a bool flag to `scanIfItemChanged()` to indicate when the scan was initiated from a delete function, and if so, tell `IsEquivalentOptional()` to ignore Xattrs and Ownership regardless of the global setting. I tested this with my sledgehammer and it seems to pass.
2024-02-27all: Use own automaxprocs package that doesn't log (ref #9436) (#9437)v1.27.4-rc.2v1.27.4Jakob Borg
### Purpose 🤫
2024-02-26all: Use Linux container CPU quota (fixes #9357, fixes #9435) (#9436)Thomas
Go is not cgroup aware and by default will set GOMAXPROCS to the number of available threads, regardless of whether it is within the allocated quota. This behaviour causes high amount of CPU throttling and degraded application performance.
2024-02-26cmd/syncthing: Remove legacy GOMAXPROCS handling (ref #9436)Jakob Borg
2024-02-26gui, man, authors: Update docs, translations, and contributorsSyncthing Release Automation
2024-02-22docker: Add support for setting umask (#9429)Beat Reichenbach
Add support for setting umask value in the Docker `entrypoint.sh` script. This is useful when not syncing permissions and working with groups, and needing umask values like `002` instead of `022`.
2024-02-19gui, man, authors: Update docs, translations, and contributorsSyncthing Release Automation
2024-02-12gui, man, authors: Update docs, translations, and contributorsv1.27.4-rc.1Syncthing Release Automation
2024-02-11build: Use correct Go version also for script runs (#9414)Jakob Borg
The changes to go.mod in latest Go 1.21/1.22 are not fully understood by older Go that might be pre-installed on builds, so make sure we always have a modern one in place even for running small release scripts etc.
2024-02-11lib/api: Deflake TestAPIServiceRequests (#9413)Jakob Borg
Somewhere along the way, the non-parallel test became parallel, and at that point, timeouts occurred. Parallel is better, so increase the timeout on the offending call a bit...
2024-02-11lib/model: Deflake new IndexHandlerTest (#9412)Jakob Borg
The new test has a flakiness factor on slow platforms, where the close on the sending connection races with the last index message, potentially messing up the count. This adds a wait to ensure that all sent messages are received, or the test will eventually fail with a timeout.
2024-02-10all: Use some Go 1.21 features (#9409)Jakob Borg
2024-02-10lib/model, lib/protocol: Remove FileInfoBatch reuse behavior (#9399)Jakob Borg
2024-02-09build: Use Go 1.22, minimum is Go 1.21 (#9408)Jakob Borg
Also updated dependencies, and an adjustment to build tags for how those are handled and how irrelevant go1.15 is nowadays...
2024-02-09lib/logger: Reduce API surface (#9404)Jakob Borg
There is no need to expose the IsTraced() thing; it's just used in initialisation, and thereafter ShouldDebug() is the corresponding correct call.
2024-02-06lib/logger: Split STTRACE into list of strings (#9402)gudvinr
Currently `IsTraced("xyz")` will return true for any inclusion of "xyz" in string. This change splits `STTRACE` using `','`, `' '` and `';'` as delimiters. That makes facilities separation more clear.
2024-02-05gui, man, authors: Update docs, translations, and contributorsSyncthing Release Automation
2024-02-01lib/model: Typo in method name (fixes #9389)Jakob Borg
2024-02-01lib/model: Typo in debug print (fixes #9386)Jakob Borg
2024-01-31build: Update dependencies (#9379)Jakob Borg
2024-01-31build(deps): bump actions/cache from 3 to 4 (#9363)dependabot[bot]
Bumps [actions/cache](https://github.com/actions/cache) from 3 to 4. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/actions/cache/releases">actions/cache's releases</a>.</em></p> <blockquote> <h2>v4.0.0</h2> <h2>What's Changed</h2> <ul> <li>Update action to node20 by <a href="https://github.com/takost"><code>@​takost</code></a> in <a href="https://redirect.github.com/actions/cache/pull/1284">actions/cache#1284</a></li> <li>feat: save-always flag by <a href="https://github.com/to-s"><code>@​to-s</code></a> in <a href="https://redirect.github.com/actions/cache/pull/1242">actions/cache#1242</a></li> </ul> <h2>New Contributors</h2> <ul> <li><a href="https://github.com/takost"><code>@​takost</code></a> made their first contribution in <a href="https://redirect.github.com/actions/cache/pull/1284">actions/cache#1284</a></li> <li><a href="https://github.com/to-s"><code>@​to-s</code></a> made their first contribution in <a href="https://redirect.github.com/actions/cache/pull/1242">actions/cache#1242</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/actions/cache/compare/v3...v4.0.0">https://github.com/actions/cache/compare/v3...v4.0.0</a></p> <h2>v3.3.3</h2> <h2>What's Changed</h2> <ul> <li>Cache v3.3.3 by <a href="https://github.com/robherley"><code>@​robherley</code></a> in <a href="https://redirect.github.com/actions/cache/pull/1302">actions/cache#1302</a></li> </ul> <h2>New Contributors</h2> <ul> <li><a href="https://github.com/robherley"><code>@​robherley</code></a> made their first contribution in <a href="https://redirect.github.com/actions/cache/pull/1302">actions/cache#1302</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/actions/cache/compare/v3...v3.3.3">https://github.com/actions/cache/compare/v3...v3.3.3</a></p> <h2>v3.3.2</h2> <h2>What's Changed</h2> <ul> <li>Fixed readme with new segment timeout values by <a href="https://github.com/kotewar"><code>@​kotewar</code></a> in <a href="https://redirect.github.com/actions/cache/pull/1133">actions/cache#1133</a></li> <li>Readme fixes by <a href="https://github.com/kotewar"><code>@​kotewar</code></a> in <a href="https://redirect.github.com/actions/cache/pull/1134">actions/cache#1134</a></li> <li>Updated description of the lookup-only input for main action by <a href="https://github.com/kotewar"><code>@​kotewar</code></a> in <a href="https://redirect.github.com/actions/cache/pull/1130">actions/cache#1130</a></li> <li>Change two new actions mention as quoted text by <a href="https://github.com/bishal-pdMSFT"><code>@​bishal-pdMSFT</code></a> in <a href="https://redirect.github.com/actions/cache/pull/1131">actions/cache#1131</a></li> <li>Update Cross-OS Caching tips by <a href="https://github.com/pdotl"><code>@​pdotl</code></a> in <a href="https://redirect.github.com/actions/cache/pull/1122">actions/cache#1122</a></li> <li>Bazel example (Take <a href="https://redirect.github.com/actions/cache/issues/2">#2</a>️⃣) by <a href="https://github.com/vorburger"><code>@​vorburger</code></a> in <a href="https://redirect.github.com/actions/cache/pull/1132">actions/cache#1132</a></li> <li>Remove actions to add new PRs and issues to a project board by <a href="https://github.com/jorendorff"><code>@​jorendorff</code></a> in <a href="https://redirect.github.com/actions/cache/pull/1187">actions/cache#1187</a></li> <li>Consume latest toolkit and fix dangling promise bug by <a href="https://github.com/chkimes"><code>@​chkimes</code></a> in <a href="https://redirect.github.com/actions/cache/pull/1217">actions/cache#1217</a></li> <li>Bump action version to 3.3.2 by <a href="https://github.com/bethanyj28"><code>@​bethanyj28</code></a> in <a href="https://redirect.github.com/actions/cache/pull/1236">actions/cache#1236</a></li> </ul> <h2>New Contributors</h2> <ul> <li><a href="https://github.com/vorburger"><code>@​vorburger</code></a> made their first contribution in <a href="https://redirect.github.com/actions/cache/pull/1132">actions/cache#1132</a></li> <li><a href="https://github.com/jorendorff"><code>@​jorendorff</code></a> made their first contribution in <a href="https://redirect.github.com/actions/cache/pull/1187">actions/cache#1187</a></li> <li><a href="https://github.com/chkimes"><code>@​chkimes</code></a> made their first contribution in <a href="https://redirect.github.com/actions/cache/pull/1217">actions/cache#1217</a></li> <li><a href="https://github.com/bethanyj28"><code>@​bethanyj28</code></a> made their first contribution in <a href="https://redirect.github.com/actions/cache/pull/1236">actions/cache#1236</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/actions/cache/compare/v3...v3.3.2">https://github.com/actions/cache/compare/v3...v3.3.2</a></p> <h2>v3.3.1</h2> <h2>What's Changed</h2> <ul> <li>Reduced download segment size to 128 MB and timeout to 10 minutes by <a href="https://github.com/kotewar"><code>@​kotewar</code></a> in <a href="https://redirect.github.com/actions/cache/pull/1129">actions/cache#1129</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/actions/cache/compare/v3...v3.3.1">https://github.com/actions/cache/compare/v3...v3.3.1</a></p> <h2>v3.3.0</h2> <h2>What's Changed</h2> <ul> <li>Bug: Permission is missing in cache delete example by <a href="https://github.com/kotokaze"><code>@​kotokaze</code></a> in <a href="https://redirect.github.com/actions/cache/pull/1123">actions/cache#1123</a></li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/actions/cache/blob/main/RELEASES.md">actions/cache's changelog</a>.</em></p> <blockquote> <h1>Releases</h1> <h3>3.0.0</h3> <ul> <li>Updated minimum runner version support from node 12 -&gt; node 16</li> </ul> <h3>3.0.1</h3> <ul> <li>Added support for caching from GHES 3.5.</li> <li>Fixed download issue for files &gt; 2GB during restore.</li> </ul> <h3>3.0.2</h3> <ul> <li>Added support for dynamic cache size cap on GHES.</li> </ul> <h3>3.0.3</h3> <ul> <li>Fixed avoiding empty cache save when no files are available for caching. (<a href="https://redirect.github.com/actions/cache/issues/624">issue</a>)</li> </ul> <h3>3.0.4</h3> <ul> <li>Fixed tar creation error while trying to create tar with path as <code>~/</code> home folder on <code>ubuntu-latest</code>. (<a href="https://redirect.github.com/actions/cache/issues/689">issue</a>)</li> </ul> <h3>3.0.5</h3> <ul> <li>Removed error handling by consuming actions/cache 3.0 toolkit, Now cache server error handling will be done by toolkit. (<a href="https://redirect.github.com/actions/cache/pull/834">PR</a>)</li> </ul> <h3>3.0.6</h3> <ul> <li>Fixed <a href="https://redirect.github.com/actions/cache/issues/809">#809</a> - zstd -d: no such file or directory error</li> <li>Fixed <a href="https://redirect.github.com/actions/cache/issues/833">#833</a> - cache doesn't work with github workspace directory</li> </ul> <h3>3.0.7</h3> <ul> <li>Fixed <a href="https://redirect.github.com/actions/cache/issues/810">#810</a> - download stuck issue. A new timeout is introduced in the download process to abort the download if it gets stuck and doesn't finish within an hour.</li> </ul> <h3>3.0.8</h3> <ul> <li>Fix zstd not working for windows on gnu tar in issues <a href="https://redirect.github.com/actions/cache/issues/888">#888</a> and <a href="https://redirect.github.com/actions/cache/issues/891">#891</a>.</li> <li>Allowing users to provide a custom timeout as input for aborting download of a cache segment using an environment variable <code>SEGMENT_DOWNLOAD_TIMEOUT_MINS</code>. Default is 60 minutes.</li> </ul> <h3>3.0.9</h3> <ul> <li>Enhanced the warning message for cache unavailablity in case of GHES.</li> </ul> <h3>3.0.10</h3> <ul> <li>Fix a bug with sorting inputs.</li> <li>Update definition for restore-keys in README.md</li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/actions/cache/commit/13aacd865c20de90d75de3b17ebe84f7a17d57d2"><code>13aacd8</code></a> Merge pull request <a href="https://redirect.github.com/actions/cache/issues/1242">#1242</a> from to-s/main</li> <li><a href="https://github.com/actions/cache/commit/53b35c543921fe2e8b288765ff817de9de8d906f"><code>53b35c5</code></a> Merge branch 'main' into main</li> <li><a href="https://github.com/actions/cache/commit/65b8989fab3bb394817bdb845a453dff480c2b51"><code>65b8989</code></a> Merge pull request <a href="https://redirect.github.com/actions/cache/issues/1284">#1284</a> from takost/update-to-node-20</li> <li><a href="https://github.com/actions/cache/commit/d0be34d54485f31ca2ccbe66e6ea3d96544a807b"><code>d0be34d</code></a> Fix dist</li> <li><a href="https://github.com/actions/cache/commit/66cf064d47313d2cccf392d01bd10925da2bd072"><code>66cf064</code></a> Merge branch 'main' into update-to-node-20</li> <li><a href="https://github.com/actions/cache/commit/1326563738ddb735c5f2ce85cba8c79f33b728cd"><code>1326563</code></a> Merge branch 'main' into main</li> <li><a href="https://github.com/actions/cache/commit/e71876755e268d6cc25a5d3e3c46ae447e35290a"><code>e718767</code></a> Fix format</li> <li><a href="https://github.com/actions/cache/commit/01229828ffa049a8dee4db27bcb23ed33f2b451f"><code>0122982</code></a> Apply workaround for earlyExit</li> <li><a href="https://github.com/actions/cache/commit/3185ecfd6135856ca6d904ae032cff4f39b8b365"><code>3185ecf</code></a> Update &quot;only-&quot; actions to node20</li> <li><a href="https://github.com/actions/cache/commit/25618a0a675e8447e5ffc8ed9b7ddb2aaf927f65"><code>25618a0</code></a> Bump version</li> <li>Additional commits viewable in <a href="https://github.com/actions/cache/compare/v3...v4">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/cache&package-manager=github_actions&previous-version=3&new-version=4)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-31lib/api: Improve folder summary event, verbose service (#9370)Jakob Borg
This makes a couple of small improvements to the folder summary mechanism: - The folder summary includes the local and remote sequence numbers in clear text, rather than some odd sum that I'm not sure what it was intended to represent. - The folder summary event is generated when appropriate, regardless of whether there is an event listener. We did this before because generating it was expensive, and we wanted to avoid doing it unnecessarily. Nowadays, however, it's mostly just reading out pre-calculated metadata, and anyway, it's nice if it shows up reliably when running with -verbose. The point of all this is to make it easier to use these events to judge when devices are, in fact, in sync. As-is, if I'm looking at two devices, it's very difficult to reliably determine if they are in sync or not. The reason is that while we can ask device A if it thinks it's in sync, we can't see if the answer is "yes" because it has processed all changes from B, or if it just doesn't know about the changes from B yet. With proper sequence numbers in the event we can compare the two and determine the truth. This makes testing a lot easier.
2024-01-31lib/protocol: Refactor interface (#9375)Jakob Borg
This is a refactor of the protocol/model interface to take the actual message as the parameter, instead of the broken-out fields: ```diff type Model interface { // An index was received from the peer device - Index(conn Connection, folder string, files []FileInfo) error + Index(conn Connection, idx *Index) error // An index update was received from the peer device - IndexUpdate(conn Connection, folder string, files []FileInfo) error + IndexUpdate(conn Connection, idxUp *IndexUpdate) error // A request was made by the peer device - Request(conn Connection, folder, name string, blockNo, size int32, offset int64, hash []byte, weakHash uint32, fromTemporary bool) (RequestResponse, error) + Request(conn Connection, req *Request) (RequestResponse, error) // A cluster configuration message was received - ClusterConfig(conn Connection, config ClusterConfig) error + ClusterConfig(conn Connection, config *ClusterConfig) error // The peer device closed the connection or an error occurred Closed(conn Connection, err error) // The peer device sent progress updates for the files it is currently downloading - DownloadProgress(conn Connection, folder string, updates []FileDownloadProgressUpdate) error + DownloadProgress(conn Connection, p *DownloadProgress) error } ``` (and changing the `ClusterConfig` to `*ClusterConfig` for symmetry; we'll be forced to use all pointers everywhere at some point anyway...) The reason for this is that I have another thing cooking which is a small troubleshooting change to check index consistency during transfer. This required adding a field or two to the index/indexupdate messages, and plumbing the extra parameters in umpteen changes is almost as big a diff as this is. I figured let's do it once and avoid having to do that in the future again... The rest of the diff falls out of the change above, much of it being in test code where we run these methods manually...
2024-01-29gui, man, authors: Update docs, translations, and contributorsSyncthing Release Automation
2024-01-28lib/fs: Add invalid UTF-8 guards to watcher (fixes #9369) (#9372)kylosus
Add invalid UTF-8 guards to fix #9369. Probably not a permanent fix, but putting it up here in case someone else encounters the same panic.
2024-01-23lib/api: Remove remnants of CSRF tokens file mentions (ref #9284)Jakob Borg
2024-01-22gui, man, authors: Update docs, translations, and contributorsSyncthing Release Automation
2024-01-20gui: Remove non-functional HTML from External Versioning tooltip (ref #8923) ↵tomasz1986
(#9358) gui: Remove non-functional HTML from External Versioning tooltip (ref #8923) Since [1], it is no longer possible to use HTML in tooltips. This was addressed in [2], however the commit missed one instance of HTML that was used to change the font type of the External versioning command tooltip. This remaining HTML is removed in this commit. [1] f5e5af391a6583047c64ef8c51642003a79b75cf [2] 73c52eafb6566435dffd979c3c49562b6d5a4238 Signed-off-by: Tomasz Wilczyński <twilczynski@naver.com> ### Screenshots ![image](https://github.com/syncthing/syncthing/assets/5626656/d5f6c553-35cb-48c2-b654-809d8bbe93b8) Signed-off-by: Tomasz Wilczyński <twilczynski@naver.com>
2024-01-16cmd/ursrv: Add FreeBSD detection (#9351)bt90
### Purpose Classify `ports@freebsd` as `FreeBSD (3rd party)`
2024-01-16cmd/ursrv: Fix Arch detection (#9350)bt90
### Purpose Classify `syncthing@archlinux` as `Arch (3rd party)`
2024-01-15lib/ignore: Optimise ignoring directories for filesystem watcher (fixes ↵Jakob Borg
#9339) (#9340) This improves the ignore handling so that directories can be fully ignored (skipped in the watcher) in more cases. Specifically, where the previous rule was that any complex `!`-pattern would disable skipping directories, the new rule is that only matches on patterns *after* such a `!`-pattern disable skipping. That is, the following now does the intuitive thing: ``` /foo /bar !whatever * ``` - `/foo/**` and `/bar/**` are completely skipped, since there is no chance anything underneath them could ever be not-ignored - `!whatever` toggles the "can't skip directories any more" flag - Anything that matches `*` can't skip directories, because it's possible we can have `whatever` match something deeper. To enable this, some refactoring was necessary: - The "can skip dirs" flag is now a property of the match result, not of the pattern set as a whole. - That meant returning a boolean is not good enough, we need to actually return the entire `Result` (or, like, two booleans but that seemed uglier and more annoying to use) - `ShouldIgnore(string) boolean` went away with `Match(string).IsIgnored()` being the obvious replacement (API simplification!) - The watcher then needed to import the `ignore` package (for the `Result` type), but `fs` imports the watcher and `ignore` imports `fs`. That's a cycle, so I broke out `Result` into a package of its own so that it can be safely imported everywhere in things like `type Matcher interface { Match(string) result.Result }`. There's a fair amount of stuttering in `result.Result` and maybe we should go with something like `ignoreresult.R` or so, leaving this open for discussion. Tests refactored to suit, I think this change is in fact quite well covered by the existing ones... Also some noise because a few of the changed files were quite old and got the `gofumpt` treatment by my editor. Sorry not sorry. --------- Co-authored-by: Simon Frei <freisim93@gmail.com>
2024-01-15gui, man, authors: Update docs, translations, and contributorsv1.27.3-rc.2v1.27.3Syncthing Release Automation
2024-01-13lib/ignore: Refactor out result type (#9343)Jakob Borg
2024-01-13build: Testing infra images for infra-* branchesJakob Borg
2024-01-12lib/versioner: Expand tildes in version directory (fixes #9241) (#9327)nf
### Purpose Fix #9241 by expanding tildes in version paths. When creating the versioner file system, first try to expand any leading tildes to the user's home directory before handling relative paths. This makes a version path `"~/p"` expand to `"$HOME/p"` instead of `"/folder/~/p"`. ### Testing Added a test to lib/versioner that exercises this code path. Also manually tested with local syncthing instances.
2024-01-08lib/scanner: Prevent sync-conflict for receive-only local modifications (#9323)Julian Lehrhuber
### Purpose This PR changes behaviour of syncthing related to `receive-only` folders, which I believe to be a bug since I wouldn't expect the current behaviour. With the current syncthing codebase, a file of a `receive-only` folder that is only modified locally can cause the creation of a `.sync-conflict` file. ### Testing Consider this szenario: Setup two paired clients that sync a folder with a given file (e.g. `Test.txt`). One of the clients configures the folder to be `receive-only`. Now, change the contents of the file for the receive-only client **_twice_**. With the current syncthing codebase, this leads to the creation of a `.sync-conflict` file that contains the modified contents, while the regular `Test.txt` file is reset to the cluster's provided contents. This is due to a `protocol.FileInfo#ShouldConflict` check, that is succeeding on the locally modified file. This PR changes this behaviour to not reset the file and not cause the creation of a `.sync-conflict`. Instead, the second content update is treated the same as the first content update. This PR also contains a test that fails on the current codebase and succeeds with the changes introduced in this PR. ### Screenshots This is not a GUI change ### Documentation This is not a user visible change. ## Authorship Your name and email will be added automatically to the AUTHORS file based on the commit metadata. #### Thanks to all the syncthing folks for this awesome piece of software!
2024-01-08gui, man, authors: Update docs, translations, and contributorsv1.27.3-rc.1Syncthing Release Automation
2024-01-06Fix website security link in README.md (#9325)diemade
https://syncthing.net/security/ html file does not exist ### Purpose Fixing link that is supposed to link to https://syncthing.net/security/
2024-01-04cmd/syncthing: Add CLI completion functionality (fixes #8616) (#9226)Daniel Padrta
### Purpose This implements CLI completion using the Kongplete module. As a side effect a CLI structure for syncthing/cli was created for kongplete to be able to parse and implement CLI completion. ### Testing I've tested the autocompletion manually, and it had worked, but I hadn't added any tests so as to test it automatically. Additionally, I ran `go run build.go test` with all tests passing.
2024-01-04lib/api: Save session & CSRF tokens to database, add option to stay logged ↵Jakob Borg
in (fixes #9151) (#9284) This adds a "token manager" which handles storing and checking expired tokens, used for both sessions and CSRF tokens. It removes the old, corresponding functionality for CSRFs which saved things in a file. The result is less crap in the state directory, and active login sessions now survive a Syncthing restart (this really annoyed me). It also adds a boolean on login to create a longer-lived session cookie, which is now possible and useful. Thus we can remain logged in over browser restarts, which was also annoying... :) <img width="1001" alt="Screenshot 2023-12-12 at 09 56 34" src="https://github.com/syncthing/syncthing/assets/125426/55cb20c8-78fc-453e-825d-655b94c8623b"> Best viewed with whitespace-insensitive diff, as a bunch of the auth functions became methods instead of closures which changed indentation.
2024-01-04Update dependencies (#9321)Jakob Borg
``` % export GOTOOLCHAIN=go1.20.7 % go list -m all | cut -d ' ' -f 1 | xargs go get -u % go mod tidy ``` Except: - github.com/jackpal/gateway now requires Go 1.21 - github.com/shirou/gopsutil breaks linux-mips in latest version