mirror of
https://github.com/unshackle-dl/unshackle.git
synced 2026-11-27 03:15:08 +00:00
fix(api): cap the total size of a client cache upload and clean up after a refused session create
This commit is contained in:
@@ -666,7 +666,7 @@ suffix, which is the `Cacher` cache key the service reads it with:
|
||||
Both sides reject a cache key with a drive letter, a root, a `..` segment, an empty
|
||||
segment, or more than 8 segments before it becomes a path, so a peer cannot write
|
||||
outside the cache directory. Both sides also refuse a `cache` map with more than
|
||||
256 entries, and the server refuses the request body of a remote session creation or of a search when it is larger than 8 MiB. The client gives a warning when it has more than 256 cache files to send. The server skips a cache key it cannot write, such as one that names an
|
||||
256 entries, and the server refuses the request body of a remote session creation or of a search when it is larger than 8 MiB. The server also refuses a `cache` map whose files inflate to more than 16 MiB in total, with `400 INVALID_INPUT`. It checks every entry before it writes a file, and it removes the cache directory of a remote session creation that fails. The client gives a warning when it has more than 256 cache files or more than 16 MiB to send. It also stops saving the cache files that a server returns at 16 MiB. The server skips a cache key it cannot write, such as one that names an
|
||||
existing file as a directory, and logs a warning.
|
||||
|
||||
### Remote session info response
|
||||
|
||||
Reference in New Issue
Block a user