diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index ab2b4a78..f467e83d 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -13,12 +13,7 @@ name: "CodeQL" on: push: - branches: [ master ] - pull_request: - # The branches below must be a subset of the branches above - branches: [ master ] - schedule: - - cron: '37 18 * * 5' + workflow_dispatch: jobs: analyze: @@ -52,8 +47,8 @@ jobs: # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). # If this step fails, then you should remove it and run the build manually (see below) - - name: Autobuild - uses: github/codeql-action/autobuild@v2 + # - name: Autobuild + # uses: github/codeql-action/autobuild@v2 # â„šī¸ Command-line programs to run using the OS shell. # 📚 https://git.io/JvXDl @@ -62,9 +57,10 @@ jobs: # and modify them (or add more) to build your code if your project # uses a compiled language - #- run: | - # make bootstrap - # make release + - run: | + python3 -m venv venv + source venv/bin/activate + pip install -r requirements.txt - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v2 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 5b80bff1..67e067fe 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -1,6 +1,7 @@ name: tests -on: [] +on: + workflow_dispatch: jobs: test: diff --git a/src/Config.py b/src/Config.py index f19b9bbe..9f5de779 100644 --- a/src/Config.py +++ b/src/Config.py @@ -184,10 +184,10 @@ trackers = [ class Config(object): def __init__(self, argv): - self.version = "0.7.9" + self.version = "0.7.9+" self.user_agent = "conservancy" # DEPRECATED ; replace with git-generated commit - self.rev = 5100 + self.rev = 5110 self.user_agent_rev = 8192 self.argv = argv self.action = None diff --git a/src/Content/ContentManager.py b/src/Content/ContentManager.py index 350370d0..bcf96c0b 100644 --- a/src/Content/ContentManager.py +++ b/src/Content/ContentManager.py @@ -514,6 +514,11 @@ class ContentManager(object): for permission_pattern, permission_rules in list(user_contents["permission_rules"].items()): # Regexp rules if not SafeRe.match(permission_pattern, user_urn): continue # Rule is not valid for user + if permission_rules is None: + self.log.info(f'Permission rule for {permission_pattern} is null, ' + 'we set max_size[_optional] to zero. ' + 'NOTE: This is not supported by <0.7.10') + permission_rules = {'max_size': 0, 'max_size_optional': 0} # Update rules if its better than current recorded ones for key, val in permission_rules.items(): if key not in rules: