diff --git a/daemon.py b/daemon.py index c335b74b1..bc03ad37f 100644 --- a/daemon.py +++ b/daemon.py @@ -1724,7 +1724,7 @@ class PubServer(BaseHTTPRequestHandler): print('moderationText: ' + moderationText) nickname = moderationText if nickname.startswith('http') or \ - nickname.startswith('dat'): + nickname.startswith('hyper'): nickname = getNicknameFromActor(nickname) if '@' in nickname: nickname = nickname.split('@')[0] @@ -1739,7 +1739,7 @@ class PubServer(BaseHTTPRequestHandler): if moderationButton == 'block': fullBlockDomain = None if moderationText.startswith('http') or \ - moderationText.startswith('dat'): + moderationText.startswith('hyper'): # https://domain blockDomain, blockPort = \ getDomainFromActor(moderationText) @@ -1757,7 +1757,7 @@ class PubServer(BaseHTTPRequestHandler): if moderationButton == 'unblock': fullBlockDomain = None if moderationText.startswith('http') or \ - moderationText.startswith('dat'): + moderationText.startswith('hyper'): # https://domain blockDomain, blockPort = \ getDomainFromActor(moderationText) diff --git a/epicyon.py b/epicyon.py index aa3966cea..226dee02a 100644 --- a/epicyon.py +++ b/epicyon.py @@ -1602,9 +1602,7 @@ if args.proxyPort: setConfigParam(baseDir, 'proxyPort', proxyPort) if args.gnunet: httpPrefix = 'gnunet' -if args.dat: - httpPrefix = 'dat' -if args.hyper: +if args.dat or args.hyper: httpPrefix = 'hyper' if args.i2p: httpPrefix = 'http' @@ -1645,7 +1643,7 @@ if args.followers: if '/@' in args.followers or \ '/users/' in args.followers or \ args.followers.startswith('http') or \ - args.followers.startswith('dat'): + args.followers.startswith('hyper'): # format: https://domain/@nick prefixes = getProtocolPrefixes() for prefix in prefixes: diff --git a/follow.py b/follow.py index 096394dd4..5567dd9bf 100644 --- a/follow.py +++ b/follow.py @@ -338,7 +338,7 @@ def _getNoOfFollows(baseDir: str, nickname: str, domain: str, not line.startswith('http'): ctr += 1 elif ((line.startswith('http') or - line.startswith('dat')) and + line.startswith('hyper')) and hasUsersPath(line)): ctr += 1 return ctr @@ -456,7 +456,7 @@ def getFollowingFeed(baseDir: str, domain: str, port: int, path: str, line2.split('@')[0] following['orderedItems'].append(url) elif ((line.startswith('http') or - line.startswith('dat')) and + line.startswith('hyper')) and hasUsersPath(line)): # https://domain/users/nickname pageCtr += 1 diff --git a/person.py b/person.py index 2f5b357c2..8fa100572 100644 --- a/person.py +++ b/person.py @@ -1208,7 +1208,7 @@ def getActorJson(hostDomain: str, handle: str, http: bool, gnunet: bool, if '/@' in handle or \ '/users/' in handle or \ handle.startswith('http') or \ - handle.startswith('dat'): + handle.startswith('hyper'): # format: https://domain/@nick originalHandle = handle if not hasUsersPath(originalHandle): diff --git a/posts.py b/posts.py index 8280ccc8c..0f7789111 100644 --- a/posts.py +++ b/posts.py @@ -1825,7 +1825,7 @@ def createReportPost(baseDir: str, if moderatorActor not in moderatorsList: moderatorsList.append(moderatorActor) continue - if line.startswith('http') or line.startswith('dat'): + if line.startswith('http') or line.startswith('hyper'): # must be a local address - no remote moderators if '://' + domainFull + '/' in line: if line not in moderatorsList: diff --git a/pyjsonld.py b/pyjsonld.py index 18bfbcd79..36d0df1fa 100644 --- a/pyjsonld.py +++ b/pyjsonld.py @@ -371,7 +371,7 @@ def load_document(url): # validate URL pieces = urllib_parse.urlparse(url) if (not all([pieces.scheme, pieces.netloc]) or - pieces.scheme not in ['http', 'https', 'dat'] or + pieces.scheme not in ['http', 'https', 'hyper'] or set(pieces.netloc) > set( string.ascii_letters + string.digits + '-.:')): raise JsonLdError(