Permalink
Browse files

HSTS admin fixup; I guess it is not very good if "One Year" is part o…

…f the config.
  • Loading branch information...
1 parent 209e476 commit a7c57b8325168380502afdd10a91fb37aae965ce @skinkie committed Nov 14, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 admin/PageVServer.py
View
@@ -685,7 +685,7 @@ def __init__ (self, vsrv_num, refreshable):
table.Add (_('Enable HSTS'), CTK.CheckCfgText ('%s!hsts'%(pre), False, _('Accept')), _(NOTE_HSTS))
if int(CTK.cfg.get_val('%s!hsts' %(pre), "0")):
- table.Add (_('HSTS Max-Age'), CTK.TextCfg ('%s!hsts!max_age'%(pre), True, {'optional_string':_("One year")}), _(NOTE_HSTS_MAXAGE))
+ table.Add (_('HSTS Max-Age'), CTK.TextCfg ('%s!hsts!max_age'%(pre), True, {'optional_string':_("31536000")}), _(NOTE_HSTS_MAXAGE))
table.Add (_('Include Subdomains'), CTK.CheckCfgText ('%s!hsts!subdomains'%(pre), True, _('Include all')), _(NOTE_HSTS_SUBDOMAINS))
submit = CTK.Submitter (url_apply)

3 comments on commit a7c57b8

The default string should not by written to the configuration file.
Was it written to the configuration file, or you wrote the patch as a precaution measure?

Owner

skinkie replied Nov 14, 2011

Trust me it was written.

Just checked it. You are right, it does get written in the file.

The problem seems to be in how the information follows between CTK.Submiter() and CTK.TextField().
I'm applying your patch, so we stop this problem from happening any more while I try to come up with a solution for the issue in CTK.

Good stuff! :-)

Please sign in to comment.