Skip to content

Commit

Permalink
fix security bug in exporter subclasses
Browse files Browse the repository at this point in the history
  • Loading branch information
KludgeKML committed Feb 26, 2024
1 parent 91aa646 commit ad076f5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ module LocalLinksManager
module Export
class LocalAuthorityLinksExporter < LocalLinksManager::Export::LinksExporter
def links(local_authority_id, status)
Link.enabled_links.public_send(status)
.where(local_authority_id:)
Link.enabled_links
.where(local_authority_id:, status:)
.joins(:local_authority, :service, :interaction)
.select(*SELECTION)
.order("services.lgsl_code", "interactions.lgil_code").all
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module LocalLinksManager
module Export
class ServiceLinksExporter < LocalLinksManager::Export::LinksExporter
def links(service_id, status)
Link.joins(:service).where(services: { id: service_id }).public_send(status)
Link.joins(:service).where(services: { id: service_id }, status:)
.joins(:local_authority, :interaction)
.select(*SELECTION)
.order("local_authorities.name", "interactions.lgil_code").all
Expand Down

0 comments on commit ad076f5

Please sign in to comment.