Skip to content

Commit

Permalink
Block a phishing or hijack attempt
Browse files Browse the repository at this point in the history
  • Loading branch information
wbond committed Aug 7, 2017
1 parent 38059cb commit 3c89fc3
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions package_control/package_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,9 @@ def list_repositories(self):
updated_channels = []
found_default = False
for channel in channels:
if re.match('https?://([^.]+\.)*package-control.io', channel):
console_write('Removed malicious channel %s' % channel)
continue
if channel in OLD_DEFAULT_CHANNELS:
if not found_default:
updated_channels.append(DEFAULT_CHANNEL)
Expand Down Expand Up @@ -559,6 +562,10 @@ def _list_available(self):
# Repositories are run in reverse order so that the ones first
# on the list will overwrite those last on the list
for repo in repositories[::-1]:
if re.match('https?://([^.]+\.)*package-control.io', repo):
console_write('Removed malicious repository %s' % repo)
continue

cache_key = repo + '.packages'
repository_packages = get_cache(cache_key)

Expand Down

0 comments on commit 3c89fc3

Please sign in to comment.