ratonvirus 0.4.0 → 0.4.1

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: 21d118c57bf1aa46d9b6bc78a3889a850d7c6a6103e3f8c01590972206807c23
4
- data.tar.gz: 5745da5e8cebf691c69ef3bd9d0ad4fd3d21b222e25aa41087c55e44a372997b
3
+ metadata.gz: 027fd97e056390ebc3f0eff82c492afc83a4e92f1020d05f556c87d29d358e4d
4
+ data.tar.gz: c144da909ec456c23a17be3f04fb34fe4c314584eed310f17b39fcfe99da0ca6
5
5
  SHA512:
6
- metadata.gz: aa82196a8d08c1a733d967b84290eb08b41f8cbbb6b42e0f220da8c99462cc73a19dde9bef8c496a1e6e0036649921399224442624e30f574e030848551cac4f
7
- data.tar.gz: 0e5e3fe8ff3216262199cccd4599dbd9a3bf97fb7ec2c6e73475615a311a27396a7f69e9bf9e39749b5bc9b242ad0c2716a41753abfb0f59962f135ae05f49f7
6
+ metadata.gz: 1e7ea0fc1e99cf8ed987a17f83262e38ff648f9a26b34de96e9de91705fc8ffab99dd94b6dff70451a661b605a4f711e56de183aba21e48b6fbce15415d2ede5
7
+ data.tar.gz: ce610990fcb99df22fdb3f87fb423a6ccfaca5494f886da9042f7af645ce8600e1d5873e65b6d613b31cd30a012dfcac92695313980e35114ee587719c3d541c
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ # v0.4.1
2
+
3
+ Fixed:
4
+
5
+ - Issue related to the EICAR test scanner. Related to [#16](https://github.com/mainio/ratonvirus/pull/16)
6
+
1
7
  # v0.4.0
2
8
 
3
9
  Support for Rails 7
@@ -6,6 +12,12 @@ Changed:
6
12
 
7
13
  - The minimum Ruby version is now set to 2.7 as it is a requirement of Rails 7
8
14
 
15
+ # v0.3.1
16
+
17
+ Fixed:
18
+
19
+ - Issue related to the EICAR test scanner. Related to [#16](https://github.com/mainio/ratonvirus/pull/16)
20
+
9
21
  # v0.3.0
10
22
 
11
23
  Changed:
@@ -8,7 +8,13 @@ module Ratonvirus
8
8
  class Eicar < Base
9
9
  # SHA256 digest of the EICAR test file for virus testing
10
10
  # See: https://en.wikipedia.org/wiki/EICAR_test_file
11
- EICAR_SHA256 = "131f95c51cc819465fa1797f6ccacf9d494aaaff46fa3eac73ae63ffbdfd8267"
11
+ #
12
+ # This includes both, the default hash and a hash with for the file saved
13
+ # with a newline at the end of it.
14
+ EICAR_SHA256 = %w(
15
+ 275a021bbfb6489e54d471899f7db9d1663fc695ec2fe2a2c4538aabf651fd0f
16
+ 131f95c51cc819465fa1797f6ccacf9d494aaaff46fa3eac73ae63ffbdfd8267
17
+ ).freeze
12
18
 
13
19
  class << self
14
20
  def executable?
@@ -21,7 +27,7 @@ module Ratonvirus
21
27
  def run_scan(path)
22
28
  if File.file?(path)
23
29
  sha256 = Digest::SHA256.file path
24
- errors << :antivirus_virus_detected if sha256 == EICAR_SHA256
30
+ errors << :antivirus_virus_detected if EICAR_SHA256.include?(sha256.to_s)
25
31
  else
26
32
  errors << :antivirus_file_not_found
27
33
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Ratonvirus
4
- VERSION = "0.4.0"
4
+ VERSION = "0.4.1"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ratonvirus
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Antti Hukkanen