syncthing/cmd
vapatel2 854499382e
cmd/stdiscosrv: Prevent nil IPs from X-Forwarded-For (fixes #9189) (#9190)
### Purpose

Treat X-Forwarded-For as a comma-separated string to prevent nil IP being returned by the Discovery Server

### Testing

Unit Tests implemented

Testing with a Discovery Client can be done as follows:
```
A simple example to replicate this entails running Discovery with HTTP, use Nginx as a reverse proxy and hardcode (as an example) a list of IPs in the X-Forwarded-For header.
1. Send an Announcement with tcp://0.0.0.0:<some-port>
2. Query the DeviceID
3. Observe the returned IP Address is no longer nil; i.e.  `tcp://<nil>:<some-port>`
```
2023-11-08 11:10:23 +00:00
..
stcompdirs all: Remove crypto/md5 (#7493) 2021-03-17 22:22:49 +01:00
stcrashreceiver Revert "cmd/stcrashreceiver: Aggregate slice out of bounds errors" 2023-10-16 08:08:23 +02:00
stdisco all: Implement suture v4-api (#6947) 2020-11-17 13:19:04 +01:00
stdiscosrv cmd/stdiscosrv: Prevent nil IPs from X-Forwarded-For (fixes #9189) (#9190) 2023-11-08 11:10:23 +00:00
stevents cmd/stevents: Add command line argument for event type filtering. (#7226) 2020-12-22 22:10:26 +01:00
stfileinfo all: Implement variable sized blocks (fixes #4807) 2018-04-16 19:08:50 +01:00
stfinddevice lib: Removal global connection registry (#8254) 2022-04-09 16:04:56 +02:00
stfindignored all: Unused args, retvals, assignments (#7926) 2021-09-08 00:11:16 +02:00
stgenfiles all: Correct various typos (#8870) 2023-05-09 08:54:02 +02:00
strelaypoolsrv cmd/strelaypoolsrv: Update map tile URL (#8985) 2023-07-16 17:20:40 +02:00
strelaysrv cmd/strelaysrv: Handle accept error with debug set (fixes #9001) (#9004) 2023-07-26 23:55:48 +01:00
stsigtool all: Remove usage of deprecated io/ioutil (#7971) 2021-11-22 08:59:47 +01:00
stupgrades cmd/stupgrades: Serve friendlier URLs for upgrade assets (fixes #9033) 2023-08-09 21:01:15 +02:00
stvanity all: Use new Go 1.19 atomic types (#8772) 2023-02-07 12:07:34 +01:00
stwatchfile all: Remove crypto/md5 (#7493) 2021-03-17 22:22:49 +01:00
syncthing lib/config: Accept pre-hashed password (fixes #9123) (#9124) 2023-09-24 19:23:49 +02:00
ursrv cmd/ursrv: Replace "2006-01-02" with time.DateOnly (#9157) 2023-10-11 10:32:19 +00:00
.gitignore Remove reprecated st* utils 2014-07-01 12:20:25 +02:00