Publish VCC Plus OSS source distribution for 3.6.2 build 60
This commit is contained in:
commit
c652a5276d
1192 files changed
+272368
No files matched your search
@@ -0,0 +1,31 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
"""Closed public-app link policy shared by both publication checkers.
|
||||
|
||||
An organization name is not proof of repository visibility. This inventory
|
||||
records the specific external app repository reviewed for public references.
|
||||
No network lookup or permission change occurs during publication checks.
|
||||
"""
|
||||
import re
|
||||
from urllib.parse import unquote, urlsplit
|
||||
|
||||
|
||||
PUBLIC_HOST = 'vccplus-git.brianholman.com'
|
||||
APPS_NAMESPACE = '/VCCPlus' + 'Apps/'
|
||||
PUBLIC_APP_REPOSITORIES = frozenset({'cococapitalquiz'})
|
||||
|
||||
|
||||
def unapproved_app_links(text):
|
||||
problems = []
|
||||
for match in re.finditer(r'https?://[^\s<>"`\)\]]+', text):
|
||||
value = match.group(0)
|
||||
parsed = urlsplit(value)
|
||||
if parsed.hostname != PUBLIC_HOST:
|
||||
continue
|
||||
path = unquote(parsed.path)
|
||||
if not path.lower().startswith(APPS_NAMESPACE.lower()):
|
||||
continue
|
||||
rest = path[len(APPS_NAMESPACE):]
|
||||
name = rest.split('/', 1)[0].lower()
|
||||
if name not in PUBLIC_APP_REPOSITORIES or '..' in path.split('/'):
|
||||
problems.append(value)
|
||||
return problems
|
||||
Reference in new issue
Block a user