solidus_core 2.11.12 → 2.11.13
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c51ec975ec9a598a8c62ab1921bb8fd36205632e56145bca20b986f3ff89f07d
|
4
|
+
data.tar.gz: 81302c9de608750a7452ad64b380a4b0a1932ba4b477a26e828c5937fc39988f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: df514483ac9eb9d69d4063962bac359715920135901a6646be17e06f6303b1683475f46a2e4c5a4a1f66d5349720b3543dd0990ee986a1670fcfeb2e17496253
|
7
|
+
data.tar.gz: 6d1162cfaa6bedd3a748f3ea729d7134f98be6e75117312bf206748fba31120e5888023b1954f7c65f7a5b51422316b317afc483dcff0c37a4c1790648f1a111
|
@@ -12,7 +12,7 @@ module Spree
|
|
12
12
|
# end
|
13
13
|
#
|
14
14
|
class EmailValidator < ActiveModel::EachValidator
|
15
|
-
EMAIL_REGEXP =
|
15
|
+
EMAIL_REGEXP = URI::MailTo::EMAIL_REGEXP
|
16
16
|
|
17
17
|
def validate_each(record, attribute, value)
|
18
18
|
unless EMAIL_REGEXP.match? value
|
data/lib/spree/core/version.rb
CHANGED
@@ -0,0 +1,18 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
namespace :solidus do
|
4
|
+
desc 'Prints orders with invalid email (after fix for GHSA-qxmr-qxh6-2cc9)'
|
5
|
+
task check_orders_with_invalid_email: :environment do
|
6
|
+
matches = Spree::Order.find_each.reduce([]) do |matches, order|
|
7
|
+
order.email.nil? || Spree::EmailValidator::EMAIL_REGEXP.match?(order.email) ? matches : matches + [order]
|
8
|
+
end
|
9
|
+
if matches.any?
|
10
|
+
puts 'Email / ID / Number'
|
11
|
+
puts(matches.map do |order|
|
12
|
+
"#{order.email} / #{order.id} / #{order.number}"
|
13
|
+
end.join("\n"))
|
14
|
+
else
|
15
|
+
puts 'NO MATCHES'
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: solidus_core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.11.
|
4
|
+
version: 2.11.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Solidus Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-12-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actionmailer
|
@@ -942,6 +942,7 @@ files:
|
|
942
942
|
- lib/tasks/migrations/migrate_user_addresses.rake
|
943
943
|
- lib/tasks/migrations/rename_gateways.rake
|
944
944
|
- lib/tasks/order_capturing.rake
|
945
|
+
- lib/tasks/solidus/check_orders_with_invalid_email.rake
|
945
946
|
- lib/tasks/upgrade.rake
|
946
947
|
- solidus_core.gemspec
|
947
948
|
- vendor/assets/javascripts/jquery.payment.js
|