solidus_core 3.0.3 → 3.0.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: 62f37b6c4bf7750e3089c0222694e5c742dbd7c808c8bc6436b75b8748630902
4
- data.tar.gz: e6e1cf743d272aa97105886dadf319f1b5f87d40f918c8f01860b2e9b7ed398a
3
+ metadata.gz: 8b3424a4480771b18f64ce5bffadded0d5fa68e0d6e501327674fe97d7dbffa1
4
+ data.tar.gz: 68150b1a21e0a080cbc488f4384b822a64673e6dad593c84a3912b1a01205328
5
5
  SHA512:
6
- metadata.gz: 1f313251388f99f58497196bb6698faa2068dc2a08c655e92a1a038f0a893eacc3d6ee4ac6b5d2780f49e484671978b3260799e77662aa1baa32b10490c93fd5
7
- data.tar.gz: caada3471120a64a10f44378c9ee207d4c791914437e46671c6e22f0eaecc42d81885571b743e71034b8b2f466d4f9f624e64dbefac12211225b61978534392b
6
+ metadata.gz: 82d3d21248c3ef53748676daaa7a1f10f54d28e3f4fdb2a36afa87d043342842ee3c6ee7b8a8b1b189c89c5f8491011071e62e5f300da18dbc3684f9dbd85a4b
7
+ data.tar.gz: cacec2219d2797fc08c964869a27202c40504969bded34bc9410e896948f90a2fa11b1d8b7a4e0ecdbd6527222d569d16b7c4959cd9a1982a4bf890e3c3a6e02
@@ -12,7 +12,7 @@ module Spree
12
12
  # end
13
13
  #
14
14
  class EmailValidator < ActiveModel::EachValidator
15
- EMAIL_REGEXP = /\A([^@\.]|[^@\.]([^@\s]*)[^@\.])@([^@\s]+\.)+[^@\s]+\z/
15
+ EMAIL_REGEXP = URI::MailTo::EMAIL_REGEXP
16
16
 
17
17
  def validate_each(record, attribute, value)
18
18
  unless EMAIL_REGEXP.match? value
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Spree
4
- VERSION = "3.0.3"
4
+ VERSION = "3.0.4"
5
5
 
6
6
  def self.solidus_version
7
7
  VERSION
@@ -5,7 +5,7 @@ module Spree
5
5
  module BlacklistUrls
6
6
  def setup_url_blacklist(browser)
7
7
  if browser.respond_to?(:url_blacklist)
8
- browser.url_blacklist = ['http://fonts.googleapis.com']
8
+ browser.url_blacklist = ['https://fonts.googleapis.com']
9
9
  end
10
10
  end
11
11
  end
@@ -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.0.3
4
+ version: 3.0.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-17 00:00:00.000000000 Z
11
+ date: 2021-12-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionmailer
@@ -903,6 +903,7 @@ files:
903
903
  - lib/spree/testing_support/url_helpers.rb
904
904
  - lib/spree/user_class_handle.rb
905
905
  - lib/spree_core.rb
906
+ - lib/tasks/solidus/check_orders_with_invalid_email.rake
906
907
  - lib/tasks/upgrade.rake
907
908
  - solidus_core.gemspec
908
909
  - vendor/assets/javascripts/jquery.payment.js