logstop 0.3.0 → 0.3.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: a53f7c35dc4fa281960cb1d890c9bfc2f884b2624ecd9939946d000b5cedac7f
4
- data.tar.gz: 2efd9b35e4d069224e8093d54c78101e40265191b8d588a6ac79694e41638da7
3
+ metadata.gz: 2c789572d82afc9bd20c1c8414bf450cf23ba224cbee9c19d05175681c3e64ca
4
+ data.tar.gz: ec27ac10131118d95ef04c1646b43ba6244b132934d4d51dfaa4cb66d6da5291
5
5
  SHA512:
6
- metadata.gz: 5ee9bd48289258b6678492aa84da9777c8ee579416736dddf91b86f5cb57bdd0db64ba7402e1b83b4d4992437f87be467714ba1d397a5e4a7e656bf1746b731b
7
- data.tar.gz: cf5c437b6bdb8819b9a717f307b53cdf0225ae86df78c270c919993deb36afd3493dc2b9734508a99eebafd28797ac5c3abfd7c08e979384f3d3559c00206ce6
6
+ metadata.gz: 74785a1b621085024a1e8267a01f4cc0f2d886edcb0a3a31a6f2f3c6c9eb5f326014420e60381ef6e5d48ccc318014fe6b3ab57e8b08f92eb536de960c91841d
7
+ data.tar.gz: 946b1c80aa52a3c77f2cdb3193a4a3ac48db93cc7849ed5ac8f602c6278f2d9f8f25138153d8e63f64888ce10b1aced1424466f2b81f5604513835cca53efe2e
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 0.3.1 (2023-07-02)
2
+
3
+ - Reduced false matches for URL passwords
4
+
1
5
  ## 0.3.0 (2022-09-06)
2
6
 
3
7
  - Added support for international phone numbers
data/README.md CHANGED
@@ -55,7 +55,7 @@ To scrub IP addresses (IPv4), use:
55
55
  Logstop.guard(logger, ip: true)
56
56
  ```
57
57
 
58
- To scrub MAC addresses, use: [unreleased]
58
+ To scrub MAC addresses, use:
59
59
 
60
60
  ```ruby
61
61
  Logstop.guard(logger, mac: true)
@@ -1,3 +1,3 @@
1
1
  module Logstop
2
- VERSION = "0.3.0"
2
+ VERSION = "0.3.1"
3
3
  end
data/lib/logstop.rb CHANGED
@@ -1,6 +1,6 @@
1
- require "logstop/formatter"
2
- require "logstop/railtie" if defined?(Rails)
3
- require "logstop/version"
1
+ require_relative "logstop/formatter"
2
+ require_relative "logstop/railtie" if defined?(Rails)
3
+ require_relative "logstop/version"
4
4
 
5
5
  module Logstop
6
6
  FILTERED_STR = "[FILTERED]".freeze
@@ -13,7 +13,7 @@ module Logstop
13
13
  PHONE_REGEX = /\b(?:\+\d{1,2}\s)?\(?\d{3}\)?[\s+.-]\d{3}[\s+.-]\d{4}\b/
14
14
  E164_PHONE_REGEX = /(?:\+|%2B)[1-9]\d{6,14}\b/
15
15
  SSN_REGEX = /\b\d{3}[\s+-]\d{2}[\s+-]\d{4}\b/
16
- URL_PASSWORD_REGEX = /((?:\/\/|%2F%2F)\S+(?::|%3A))\S+(@|%40)/
16
+ URL_PASSWORD_REGEX = /((?:\/\/|%2F%2F)[^\s\/]+(?::|%3A))[^\s\/]+(@|%40)/
17
17
  MAC_REGEX = /\b[0-9a-f]{2}(?:(?::|%3A)[0-9a-f]{2}){5}\b/i
18
18
 
19
19
  def self.scrub(msg, url_password: true, email: true, credit_card: true, phone: true, ssn: true, ip: false, mac: false, scrubber: nil)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstop
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Kane
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-09-06 00:00:00.000000000 Z
11
+ date: 2023-07-02 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email: andrew@ankane.org
@@ -42,7 +42,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
42
42
  - !ruby/object:Gem::Version
43
43
  version: '0'
44
44
  requirements: []
45
- rubygems_version: 3.3.7
45
+ rubygems_version: 3.4.10
46
46
  signing_key:
47
47
  specification_version: 4
48
48
  summary: Keep personal data out of your logs