mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-03-23 09:20:30 +00:00
Sanitize cookie configuration.
This commit is contained in:
parent
8ef2979905
commit
25cde6775b
1 changed files with 9 additions and 0 deletions
|
|
@ -258,6 +258,8 @@ class Configuration (dict):
|
|||
self.sanitize_checkcss()
|
||||
if self['scanvirus']:
|
||||
self.sanitize_scanvirus()
|
||||
if self['storecookies']:
|
||||
self.sanitize_cookies()
|
||||
|
||||
def sanitize_anchors (self):
|
||||
if not self["warnings"]:
|
||||
|
|
@ -269,6 +271,7 @@ class Configuration (dict):
|
|||
|
||||
def sanitize_logger (self):
|
||||
if not self['output']:
|
||||
log.warn(LOG_CHECK, _("warning: activating text logger output."))
|
||||
self['output'] = 'text'
|
||||
self['logger'] = self.logger_new(self['output'])
|
||||
|
||||
|
|
@ -298,6 +301,12 @@ class Configuration (dict):
|
|||
_("warning: Clamav could not be initialized"))
|
||||
self['scanvirus'] = False
|
||||
|
||||
def sanitize_cookies (self):
|
||||
if not self['sendcookies']:
|
||||
log.warn(LOG_CHECK,
|
||||
_("warning: activating sendcookies because storecookies is active."))
|
||||
self['sendcookies'] = True
|
||||
|
||||
|
||||
def copy_sys_config (syspath, userpath):
|
||||
"""Try to copy the system configuration to the user configuration
|
||||
|
|
|
|||
Loading…
Reference in a new issue