From 6c4f6e6232b4423c1161e1c2ab4d3fcac860dee2 Mon Sep 17 00:00:00 2001 From: Alban Peignier Date: Sun, 13 May 2018 13:52:00 +0200 Subject: Test api_key format in TomTom.enabled?. Refs #6993 --- lib/tom_tom.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/tom_tom.rb b/lib/tom_tom.rb index 9158b7a28..91f1a3800 100644 --- a/lib/tom_tom.rb +++ b/lib/tom_tom.rb @@ -17,7 +17,7 @@ module TomTom end def self.enabled? - api_key.present? + api_key.present? && /[a-zA-Z0-9]{32}/ === api_key end def self.batch(way_costs) -- cgit v1.2.3