syncthing/lib/model
Jakob Borg 6db8dc33f2
lib/model: Correctly verify short read blocks (fixes #7333) (#7334)
An untrusted device will receive padded info for small blocks, and hence
sometimes request a larger block than actually exists on disk.
Previously we let this pass because we didn't have a hash to compare to
in that case and we ignored the EOF error based on that.

Now the untrusted device does pass an encrypted hash that we decrypt and
verify. This means we can't check for len(hash)==0 any more, but on the
other hand we do have a valid hash we can apply to the data we actually
read. If it matches then we don't need to worry about the read
supposedly being a bit short.
2021-02-05 16:07:21 +01:00
..
testdata lib/model: Spurious tmp file (ref #6607) (#6609) 2020-05-07 08:49:59 +02:00
blockpullreorderer_test.go lib/model: Add support for different puller block ordering (#6587) 2020-05-11 22:44:04 +01:00
blockpullreorderer.go lib/model: Add support for different puller block ordering (#6587) 2020-05-11 22:44:04 +01:00
bytesemaphore_test.go lib/model: Allow limiting number of concurrent scans (fixes #2760) (#4888) 2018-12-05 08:40:05 +01:00
bytesemaphore.go lib/model: Don't exit pullerRoutine on cancelled ctx (fixes #6559) (#6562) 2020-04-21 18:55:14 +01:00
debug.go all, lib/logger: Refactor SetDebug calls (#6054) 2019-10-04 13:03:34 +02:00
deviceactivity_test.go all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
deviceactivity.go all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
devicedownloadstate_test.go all: Move remaining protos to use the vanity plugin (#7009) 2020-10-02 08:07:05 +02:00
devicedownloadstate.go all: Move remaining protos to use the vanity plugin (#7009) 2020-10-02 08:07:05 +02:00
doc.go all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
fakeconns_test.go lib: Close underlying conn in protocol (fixes #7165) (#7212) 2020-12-21 11:40:51 +01:00
folder_recvenc.go lib/model: Cleanup redundant filesystem variables in folders (#7237) 2020-12-27 22:26:25 +01:00
folder_recvonly_test.go lib: Apply config changes sequentially (ref #5298) (#7188) 2021-01-15 15:43:34 +01:00
folder_recvonly.go lib/model: Cleanup redundant filesystem variables in folders (#7237) 2020-12-27 22:26:25 +01:00
folder_sendonly.go lib/model: Cleanup redundant filesystem variables in folders (#7237) 2020-12-27 22:26:25 +01:00
folder_sendrecv_test.go all: Add configurable defaults (fixes #4224, fixes #6086) (#7131) 2021-02-04 21:10:41 +01:00
folder_sendrecv.go lib/model: Fix child-check when deleting dirs in pull (#7236) 2021-01-02 21:40:37 +01:00
folder_summary.go lib/api, lib/model: Avoid contention on filesystem for DB status call (ref #7270) (#7271) 2021-01-12 16:25:21 +01:00
folder_test.go lib/fs: Properly handle case insensitive systems (fixes #1787, fixes #2739, fixes #5708) 2020-07-28 11:15:11 +02:00
folder.go lib/model: Optimize rename detection in scanner (#7315) 2021-01-31 21:02:42 +01:00
folderstate.go lib/model, lib/versioner: Drive version cleanup from scanner (fixes #6313) (#6693) 2020-07-14 10:48:50 +02:00
indexsender.go lib/model: Handle index sender terminating due to error (fixes #7231) (#7232) 2020-12-30 09:59:11 +01:00
model_test.go all: Add configurable defaults (fixes #4224, fixes #6086) (#7131) 2021-02-04 21:10:41 +01:00
model.go lib/model: Correctly verify short read blocks (fixes #7333) (#7334) 2021-02-05 16:07:21 +01:00
progressemitter_test.go lib: Apply config changes sequentially (ref #5298) (#7188) 2021-01-15 15:43:34 +01:00
progressemitter.go all: Implement suture v4-api (#6947) 2020-11-17 13:19:04 +01:00
queue_test.go lib/model: Make jobQueue.Jobs paginated (fixes #5754) (#5804) 2019-06-27 19:25:38 +01:00
queue.go lib/model: Make jobQueue.Jobs paginated (fixes #5754) (#5804) 2019-06-27 19:25:38 +01:00
requests_test.go lib: Apply config changes sequentially (ref #5298) (#7188) 2021-01-15 15:43:34 +01:00
sentdownloadstate.go all: Move remaining protos to use the vanity plugin (#7009) 2020-10-02 08:07:05 +02:00
sharedpullerstate_test.go lib/model: Use errors.Wrap for pull errors (#5563) 2019-03-04 13:01:52 +00:00
sharedpullerstate.go lib/model: Correct pull progress for small files (fixes #7263) (#7316) 2021-01-31 23:40:15 +01:00
testos_test.go lib/fs: Properly handle case insensitive systems (fixes #1787, fixes #2739, fixes #5708) 2020-07-28 11:15:11 +02:00
testutils_test.go all: Add configurable defaults (fixes #4224, fixes #6086) (#7131) 2021-02-04 21:10:41 +01:00
util.go all: Remove potentially problematic errors from panics (fixes #5839) (#5912) 2019-07-31 10:53:35 +02:00
utils_test.go all: Remove potentially problematic errors from panics (fixes #5839) (#5912) 2019-07-31 10:53:35 +02:00