mini_defender 0.6.0 → 0.6.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: 4afc89ccb1f98c186e927a88b6bd85e9a5194f4dd74c7b45653f8a63feeb8f79
4
- data.tar.gz: 53c21490530615efe4e8ba51c52ac26e2a448f8b3c555af66744dd7c0ce238df
3
+ metadata.gz: e29762e85b9cd347c9a95273d6d08d806b6adc24ff284b6ec5e4e347c4e2b910
4
+ data.tar.gz: 2ea25d48682e25d311f90d33a3b5b8bacaa6720431380b34479eeede78468e3a
5
5
  SHA512:
6
- metadata.gz: 9cd0c033f42766e22cb7900b0903d275f3454df9293c553a5f2766154ed73760d7c28cd392ccd051d80bffa4c09027687ef7ca361d375b6f4037d706f26d6435
7
- data.tar.gz: 9a50f0cc9ab6e9cd751d978cd5e37ec48ee2c742f80b5d058af6e82db2c1d2d9fdbf2de155c967fcf5baf1e7079d6fb77ad01dbd7e1d3ed025e0f3a5f0916501
6
+ metadata.gz: 6b5411b6d0bd4565a420052b3baceebff4bb1873c42c68b48f566c20533f28fd674f37f4df9bab3e6877d0959e2671fc886d1154e9d6de34508de04bae2c4778
7
+ data.tar.gz: 3707890c60e1c3eccff9ab37287819a3e8997b101c5d74ef37fd2cc7bf5466d5304095607a20e8a3f2ab06de0cae22d4055b1f15a5243785511807d77680fdb6
@@ -53,7 +53,10 @@ class MiniDefender::Rules::Integer < MiniDefender::Rule
53
53
  return true
54
54
  end
55
55
 
56
- value = value.to_s
56
+ # Remove leading zero so Integer will not treat it as octal
57
+ value = value
58
+ .to_s
59
+ .gsub(/^0+/, '')
57
60
 
58
61
  if @mode == 'relaxed'
59
62
  value = normalize_digits(value)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module MiniDefender
4
- VERSION = "0.6.0"
4
+ VERSION = "0.6.1"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mini_defender
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ali Alhoshaiyan
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-03-12 00:00:00.000000000 Z
11
+ date: 2024-03-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport