Skip to content

Commit

Permalink
HSTS admin fixup; I guess it is not very good if "One Year" is part o…
Browse files Browse the repository at this point in the history
…f the config.
  • Loading branch information
skinkie committed Nov 14, 2011
1 parent 209e476 commit a7c57b8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion admin/PageVServer.py
Expand Up @@ -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)
Expand Down

3 comments on commit a7c57b8

@alobbs
Copy link

@alobbs alobbs commented on a7c57b8 Nov 14, 2011

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

@skinkie
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trust me it was written.

@alobbs
Copy link

@alobbs alobbs commented on a7c57b8 Nov 16, 2011

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.