diff --git a/server.py b/server.py index 10e06b6..9a033e6 100644 --- a/server.py +++ b/server.py @@ -114,6 +114,7 @@ class Anonymous_Github: application.config.update( SESSION_TYPE='filesystem', + PERMANENT_SESSION_LIFETIME=60*15, # 15 min SECRET_KEY=self.secret_key, GITHUB_CLIENT_ID=self.client_id, GITHUB_CLIENT_SECRET=self.client_secret, @@ -174,7 +175,7 @@ class Anonymous_Github: return Markup("The file %s is too big to be anonymized (beyond 1MB, Github limit)" % (file.name)) if ".md" in file.name or file.name == file.name.upper() or "changelog" == file.name.lower(): gh = self.github - if 'token' in repository_configuration: + if 'token' in repository_configuration and repository_configuration['token'] is not None: gh = github.Github(repository_configuration['token']) return Markup("