STS (Secure Time Seeding) uses server time from SSL handshakes, which is fine when talking to other Microsoft servers, but other implementations put random data in that field to prevent fingerprinting.
STS (Secure Time Seeding) uses server time from SSL handshakes, which is fine when talking to other Microsoft servers, but other implementations put random data in that field to prevent fingerprinting.
That’ll be one weird regression test. Imagine the comment you’ll have to write to explain “why” this test exists.
While the root issue was still unknown, we actually wrote one. It sort of made sense. Check that the date from isn’t later than date to in the generated range used for the synchronization request. Obviously. You never know what some idiot future coder (usually yourself some weeks from now) would do, am I right?
However, it was far worse to write the code that fulfilled the test. In the very same few lines of code, we fetched the current date from
time.now()
plus some time span asdate.to
, fetched the last synchronization timestamp from db asdate.from
, and then validated thatdate.from
wasn’t greater thandate.to
, and if so, log an error about it.The validation code made no logic sense when looking at it.
Feels like writing
Assert.is(false,“This should never happen”);
and seeing it pop up one time?