Skip to content

Conversation

@SISheogorath
Copy link
Contributor

It seems like the inital work on the hsts module expected milliseconds.
This has either changed or was never true. Either way, it caused that
the current defaults resulted in theory in a 1000 year HSTS policy.
Luckily helmet was smart enough to not go higher than 1 year.

Anyway, this patch fixes the multiplication of the configured size with
1000 by removing this multiplication.

Also to simplify the reading of the defaults, we split them into their
components, 60 times 60 seconds so we get one hour. 24 of those hours so
we get a day and finally 365 days to get our original wanted default of
one year.

Reference:
d69d65e

Fixes #1015

It seems like the inital work on the hsts module expected milliseconds.
This has either changed or was never true. Either way, it caused that
the current defaults resulted in theory in a 1000 year HSTS policy.
Luckily helmet was smart enough to not go higher than 1 year.

Anyway, this patch fixes the multiplication of the configured size with
1000 by removing this multiplication.

Also to simplify the reading of the defaults, we split them into their
components, 60 times 60 seconds so we get one hour. 24 of those hours so
we get a day and finally 365 days to get our original wanted default of
one year.

Reference:
d69d65e
Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
@SISheogorath SISheogorath added the bug Something isn't working label Nov 19, 2018
@SISheogorath SISheogorath added this to the 1.3.0 release milestone Nov 19, 2018
@SISheogorath SISheogorath merged commit 2244b11 into hackmdio:master Nov 21, 2018
@SISheogorath SISheogorath deleted the fix/hstsSeconds branch November 21, 2018 00:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant