sensitive_data_filter 0.2.2 → 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a261b73722b8e8d4c06560471d37414141e55717
|
|
4
|
+
data.tar.gz: 9965b9987b96acb630fd8e25aabe4816616caa59
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a5ad9c4cb5b8e2a81fe30c2d26faf91c27e1cd61915ca49601d4269d8e8335020f35aa6b87ebaaa8da5600eb3ac882467589d7cf12794198ed4ac58b45a7f1de
|
|
7
|
+
data.tar.gz: fc7437e569a114e98b48f3d084b76fd42eaf080622894d1663fac52e52ffc3890900332e2f322b31d807aaaf372058da785855aa05584a643c610159cf40d2ef
|
data/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file.
|
|
|
3
3
|
This project adheres to [Semantic Versioning](http://semver.org/).
|
|
4
4
|
This changelog adheres to [Keep a CHANGELOG](http://keepachangelog.com/).
|
|
5
5
|
|
|
6
|
+
## [0.2.3] - 2016-12-22
|
|
7
|
+
### Fixed
|
|
8
|
+
- Ensures that the url returned by the occurrence is filtered
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
- Does not match credit cards numbers that are part of longer numbers
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
## [0.2.2] - 2016-12-21
|
|
7
15
|
### Fixed
|
|
8
16
|
- Implements stricter credit cards pattern matching
|
|
@@ -35,7 +35,7 @@ module SensitiveDataFilter
|
|
|
35
35
|
@filtered_env_parser.body_params
|
|
36
36
|
end
|
|
37
37
|
|
|
38
|
-
def_delegators :@
|
|
38
|
+
def_delegators :@filtered_env_parser, :request_method, :url, :content_type, :session
|
|
39
39
|
|
|
40
40
|
def matches_count
|
|
41
41
|
@matches.map { |type, matches| [type, matches.count] }.to_h
|
|
@@ -7,8 +7,10 @@ module SensitiveDataFilter
|
|
|
7
7
|
SEPARATORS = /[\s-]/
|
|
8
8
|
SEPRS = SEPARATORS.source + '*'
|
|
9
9
|
LENGTHS = (11..19)
|
|
10
|
-
CARD = Regexp.new(
|
|
11
|
-
|
|
10
|
+
CARD = Regexp.new(
|
|
11
|
+
LENGTHS.map { |length| /(?=((?<!\d)(?:\d#{SEPRS}){#{length - 1}}\d(?!\d))?)/.source }.join
|
|
12
|
+
)
|
|
13
|
+
FILTERED = '[FILTERED]'
|
|
12
14
|
|
|
13
15
|
module_function def valid?(number)
|
|
14
16
|
return false unless number.is_a? String
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: sensitive_data_filter
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Alessandro Berardi
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: exe
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2016-12-
|
|
12
|
+
date: 2016-12-22 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: rack
|