Skip to content

Commit

Permalink
Removed the host blacklist from the default installation.
Browse files Browse the repository at this point in the history
The capability to add blacklisted domains and keep users from
subscribing to feeds in those domains is still implemented, but the
domain blacklist itself is emtpy in the default installation.

Also removed all references to AEDE (spanish newspaper association).
This feature was implemented to blacklist AEDE domains, but it can be
used to blacklist any domains.
  • Loading branch information
amatriain committed Jan 22, 2021
1 parent 9552107 commit a2d37f3
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 484 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]
### Changed
Nothing yet
- Removed the unused "staging" environment.
- Removed blacklisted hosts. The capability for FeedBunch to blacklist hosts, keeping users from
subscribing to feeds in those hosts, is still implemented, but the list is empty in the default
installation.

## [1.3.17] - 2021-01-22
### Changed
Expand Down
2 changes: 2 additions & 0 deletions config/host_blacklist.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# blacklisted hosts. FeedBunch won't allow subscribing to a feed hosted in one of these hosts.
hosts:
6 changes: 3 additions & 3 deletions config/initializers/hosts_blacklist.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@

require 'addressable/uri'

list = YAML.load_file 'config/url_blacklist.yml'
list = YAML.load_file 'config/host_blacklist.yml'

# We actually store the host for each URL in the blacklist, which is what we're actually interested in
# Store in the blacklist the host for each line, which is what we're interested in
blacklist = []
list['aede_urls'].each do |url|
list['hosts'].each do |url|
blacklisted_url = UrlNormalizer.normalize_feed_url(url).downcase
blacklisted_host = Addressable::URI.parse(blacklisted_url).host
blacklist << blacklisted_host
Expand Down
2 changes: 1 addition & 1 deletion config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ en:
success_subscribing: "Feed subscribed successfully."
problem_subscribing: "Could not add subscription."
problem_unsubscribing: "There has been a problem unsubscribing from the feed. Please try again later."
blacklisted_url: "Subscribing to a feed associated with AEDE (spanish newspaper publishers association) is not allowed"
blacklisted_url: "This domain is in the domain blacklist. Subscribing to a feed in this domain is not allowed."
success_move_to_folder: "Feed moved to a different folder"
success_remove_from_folder: "Feed removed from folder"
success_move_to_new_folder: "Feed moved to a new folder"
Expand Down
2 changes: 1 addition & 1 deletion config/locales/es.yml
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ es:
success_subscribing: "Feed suscrito con éxito."
problem_subscribing: "No se ha podido añadir la suscripción."
problem_unsubscribing: "Ha habido un problema anulando la suscripción. Por favor inténtelo de nuevo más tarde."
blacklisted_url: "No está permitido suscribirse a un feed asociado con AEDE (asociación de editores de prensa españoles)"
blacklisted_url: "Este dominio está en la lista de dominios vetados. No está permitido suscribirse a un feed en este dominio."
success_move_to_folder: "Feed movido a una carpeta distinta"
success_remove_from_folder: "Feed retirado de la carpeta"
success_move_to_new_folder: "Feed movido a una nueva carpeta"
Expand Down
Loading

0 comments on commit a2d37f3

Please sign in to comment.