Open Source Continuous File Synchronization
Go to file
Emil Lundberg 8ff670c564
fix(gui): get version from header when not authenticated (#9724)
### Purpose

Since #8757, the Syncthing GUI now has an unauthenticated state. One
consequence of this is that `$scope.versionBase()` is not initialized
while unauthenticated, which causes the `docsURL` function to truncate
links to just `https://docs.syncthing.net`/, discarding the section
path. This currently affects at least the "Help > Introduction" link
reachable both while logged in and not. The issue is exacerbated in
https://github.com/syncthing/syncthing/pull/9175 where we sometimes want
to show additional contextual help links from the login page to
particular sections of the docs.

I don't think it's any worse to try to preserve the section path even
without an explicit version tag, than to fall back to just the host and
lose all context the link was attempting to provide.

### Testing

- On commit b1ed2802fb (before):
  - Open the GUI, set a username and log out.
- Open the "Help" drop-down. The "Introduction" item links to:
https://docs.syncthing.net/
  - Log in.
- Open the "Help" drop-down. The "Introduction" item links to:
https://docs.syncthing.net/v1.27.10/intro/gui
- On commit 44fef317800ce1d0795b4e2ebfbd5e9deda849ef (after):
  - Open the GUI, set a username and log out.
- Open the "Help" drop-down. The "Introduction" item links to:
https://docs.syncthing.net/intro/gui
  - Log in.
- Open the "Help" drop-down. The "Introduction" item links to:
https://docs.syncthing.net/v1.27.10/intro/gui

### Screenshots

This is a GUI change, but affecting only URLs in the markup with no
visual changes.


### Drawbacks

If a `docsURL` call generates a versionless link to a docs page that
doesn't exist on https://docs.syncthing.net - presumably because
Syncthing is not the latest version and links to a deleted page? - then
this will lead to GitHub's generic 404 page with no link to the
Syncthing docs root. Before, any versionless link would also be a
pathless link, leading to the Syncthing docs root instead of a 404 page.
2024-09-22 09:47:02 +02:00
.github chore(cmd): clean up commands (#9705) 2024-09-21 09:04:22 +02:00
assets assets, gui: Losslessly compress all JPG, PNG, and PDF images (#6265) 2020-01-16 13:52:43 +01:00
cmd chore(cmd): clean up commands (#9705) 2024-09-21 09:04:22 +02:00
etc etc: Remove restart on suspend systemd service (ref #8448) (#9611) 2024-07-17 09:29:49 +03:00
gui fix(gui): get version from header when not authenticated (#9724) 2024-09-22 09:47:02 +02:00
lib fix(connections): skip point-to-point interfaces when listing LANs (fixes #9719) (#9720) 2024-09-21 09:27:23 +02:00
man gui, man, authors: Update docs, translations, and contributors 2024-09-16 03:47:01 +00:00
meta fix(meta): return read error in forbidden_words_test (#9706) 2024-09-18 19:12:24 +02:00
next-gen-gui gui: Keep short deviceID length consistent + xrefs (fixes #9313) (#9314) 2024-01-02 17:31:57 +01:00
proto lib/model, lib/protocol: Index sending/receiving debugging (#9657) 2024-08-28 15:00:19 +02:00
script lib/geoip, cmd/relaypoolsrv, cmd/ursrv: Automatically manage GeoIP updates (#9342) 2024-05-18 20:31:49 +03:00
test lib/sha256: Remove it (#9643) 2024-08-10 12:58:20 +01:00
.codecov.yml build: Add test coverage info (#7502) 2021-04-05 10:25:39 +02:00
.deepsource.toml build: Fix deepsource test & exclude patterns (#7969) 2021-09-26 12:08:59 +02:00
.gitattributes lib/protocol: Revert protobuf encoder changes in v0.14.17 (fixes #3855) 2017-01-01 17:19:00 +00:00
.gitignore build: add generating compat.json (#9700) 2024-09-11 09:29:49 +02:00
.golangci.yml golangci: Skip godox 2019-12-18 11:33:36 +01:00
.yamlfmt build: Add more GitHub Actions 2023-02-22 10:56:55 +01:00
AUTHORS gui, man, authors: Update docs, translations, and contributors 2024-08-12 03:45:16 +00:00
build.go chore(cmd): clean up commands (#9705) 2024-09-21 09:04:22 +02:00
build.ps1 build: Clean up build.sh, add build.ps1 (#6689) 2020-05-28 12:42:15 +02:00
build.sh gui: Switch to Weblate for translations (#8777) 2023-02-07 12:22:08 +01:00
compat.yaml build: add generating compat.json (#9700) 2024-09-11 09:29:49 +02:00
CONDUCT.md conduct: Upgrade to Contributor Covenant 2018-06-20 23:53:06 +02:00
CONTRIBUTING.md gui: Switch to Weblate for translations (#8777) 2023-02-07 12:22:08 +01:00
Dockerfile build: Fixup Docker changes from previous (#9223) 2023-11-14 08:17:34 +01:00
Dockerfile.builder build: Fixup Docker changes from previous (#9223) 2023-11-14 08:17:34 +01:00
Dockerfile.stcrashreceiver build: Fixup Docker changes from previous (#9223) 2023-11-14 08:17:34 +01:00
Dockerfile.stdiscosrv build: Fixup Docker changes from previous (#9223) 2023-11-14 08:17:34 +01:00
Dockerfile.strelaypoolsrv lib/geoip, cmd/relaypoolsrv, cmd/ursrv: Automatically manage GeoIP updates (#9342) 2024-05-18 20:31:49 +03:00
Dockerfile.strelaysrv build: Fixup Docker changes from previous (#9223) 2023-11-14 08:17:34 +01:00
Dockerfile.stupgrades build: Fixup Docker changes from previous (#9223) 2023-11-14 08:17:34 +01:00
Dockerfile.ursrv build: Ursrv image for infrastructure 2023-11-15 08:48:00 +01:00
go.mod build(deps): update all dependencies (#9723) 2024-09-21 09:25:27 +02:00
go.sum build(deps): update all dependencies (#9723) 2024-09-21 09:25:27 +02:00
GOALS.md readme: Style fixes, add security note (#9136) 2023-09-28 11:55:48 +02:00
LICENSE all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
README-Docker.md docker: Add support for setting umask (#9429) 2024-02-22 08:47:43 +00:00
README.md Removed no longer relevant Bountysource link (#9480) 2024-03-23 00:23:02 +01:00
tools.go build: Update quic-go for Go 1.19 (#8483) 2022-08-03 15:43:26 +02:00

Syncthing


MPLv2 License CII Best Practices Go Report Card

Goals

Syncthing is a continuous file synchronization program. It synchronizes files between two or more computers. We strive to fulfill the goals below. The goals are listed in order of importance, the most important ones first. This is the summary version of the goal list - for more commentary, see the full Goals document.

Syncthing should be:

  1. Safe From Data Loss

    Protecting the user's data is paramount. We take every reasonable precaution to avoid corrupting the user's files.

  2. Secure Against Attackers

    Again, protecting the user's data is paramount. Regardless of our other goals, we must never allow the user's data to be susceptible to eavesdropping or modification by unauthorized parties.

  3. Easy to Use

    Syncthing should be approachable, understandable, and inclusive.

  4. Automatic

    User interaction should be required only when absolutely necessary.

  5. Universally Available

    Syncthing should run on every common computer. We are mindful that the latest technology is not always available to every individual.

  6. For Individuals

    Syncthing is primarily about empowering the individual user with safe, secure, and easy to use file synchronization.

  7. Everything Else

    There are many things we care about that don't make it on to the list. It is fine to optimize for these values, as long as they are not in conflict with the stated goals above.

Getting Started

Take a look at the getting started guide.

There are a few examples for keeping Syncthing running in the background on your system in the etc directory. There are also several GUI implementations for Windows, Mac, and Linux.

Docker

To run Syncthing in Docker, see the Docker README.

Getting in Touch

The first and best point of contact is the Forum. If you've found something that is clearly a bug, feel free to report it in the GitHub issue tracker.

If you believe that youve found a Syncthing-related security vulnerability, please report it by emailing security@syncthing.net. Do not report it in the Forum or issue tracker.

Building

Building Syncthing from source is easy. After extracting the source bundle from a release or checking out git, you just need to run go run build.go and the binaries are created in ./bin. There's a guide with more details on the build process.

Signed Releases

As of v0.10.15 and onwards, release binaries are GPG signed with the key D26E6ED000654A3E, available from https://syncthing.net/security/ and most key servers.

There is also a built-in automatic upgrade mechanism (disabled in some distribution channels) which uses a compiled in ECDSA signature. macOS binaries are also properly code signed.

Documentation

Please see the Syncthing documentation site [source].

All code is licensed under the MPLv2 License.