about summary refs log tree commit diff
path: root/app/models
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2018-09-18 22:49:24 +0200
committerGitHub <noreply@github.com>2018-09-18 22:49:24 +0200
commitbac8227519ac0040f79c698c0bd6903427c61c51 (patch)
tree48621a802830c8e872ac3e66f61f20d0e801e7de /app/models
parentf4d549d30081478b1fe2bde9d340262e132bb891 (diff)
Fix performance regression in Account::Field#verifiable? (#8719)
* Fix performance regression in Account::Field#verifiable?

Regression from #8703

* Fix code style issue
Diffstat (limited to 'app/models')
-rw-r--r--app/models/account.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/account.rb b/app/models/account.rb
index 979e0b12c..d8e5c7340 100644
--- a/app/models/account.rb
+++ b/app/models/account.rb
@@ -323,7 +323,7 @@ class Account < ApplicationRecord
     end
 
     def verifiable?
-      value.present? && /\A#{FetchLinkCardService::URL_PATTERN}\z/ =~ value
+      value.present? && value.start_with?('http://', 'https://')
     end
 
     def mark_verified!