Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

…f the config.
  • Loading branch information...
commit a7c57b8325168380502afdd10a91fb37aae965ce 1 parent 209e476
Stefan de Konink authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  admin/PageVServer.py
2  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

Alvaro Lopez Ortega

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?

Stefan de Konink
Owner

Trust me it was written.

Alvaro Lopez Ortega

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.
Something went wrong with that request. Please try again.