solidus_core 3.1.3 → 3.1.4
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: cabe9b97feb5c88754e6be9c0cb22e63977a3972805c725f88861bfa2c3d8beb
|
4
|
+
data.tar.gz: 3c44f84249aa9dba36fa4afba31ae40943cf80b4484d8adf979c946374b25904
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b488346a08197d39759e4781fdfe087daeb362b76a6f4dd4262c730e7eda328c55a427f7a503c2c301e286814b82106dff5339602e927fc38bf7152f40c1be2c
|
7
|
+
data.tar.gz: 2156b59d9f751645dfcb80a5905d990d2e65945ee60733181eda7e3ba49b2a4a4628517c00c4179560e2ec06af73842047fd8aa1b65d8f99bb4f04ada1c871a3
|
@@ -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: 3.1.
|
4
|
+
version: 3.1.4
|
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
|
@@ -907,6 +907,7 @@ files:
|
|
907
907
|
- lib/spree/testing_support/url_helpers.rb
|
908
908
|
- lib/spree/user_class_handle.rb
|
909
909
|
- lib/spree_core.rb
|
910
|
+
- lib/tasks/solidus/check_orders_with_invalid_email.rake
|
910
911
|
- lib/tasks/solidus/delete_prices_with_nil_amount.rake
|
911
912
|
- solidus_core.gemspec
|
912
913
|
- vendor/assets/javascripts/jquery.payment.js
|