You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Attachments:AddTimeout over about 49.7 days passes the startup check and makes each upload throw #537
Attachments:AddTimeout has a lower bound and no upper bound. A value over about 49.7 days passes the startup check, and then each attachment add throws ArgumentOutOfRangeException from CancelAfter.
AttachmentStorage.cs:33-35. CancellationTokenSource.CancelAfter(TimeSpan) throws when the value is over uint.MaxValue - 1 milliseconds.
Reproduction steps
Set Attachments__AddTimeout=50.00:00:00 on the Server.
Start the stack. The Server starts with no error.
Upload a file to a workshop on its detail page.
A unit test can call AttachmentOptions.From with that value and assert that it throws.
Expected
The Server refuses to start, and the message names Attachments:AddTimeout and its largest value.
Actual
The Server starts, and each upload fails with a 500 from ArgumentOutOfRangeException.
Impact
A wrong setting breaks every upload, and the error does not name the setting. A large value also makes the sweep grace so long that the sweep keeps every orphan.
Activity