Skip to content

Commit

Permalink
Merge e378ff0 into 05ea58a
Browse files Browse the repository at this point in the history
  • Loading branch information
bsawicki committed Apr 6, 2021
2 parents 05ea58a + e378ff0 commit 9ada599
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions common/lib/azure/storage/common/core/utility.rb
Expand Up @@ -213,6 +213,12 @@ class String

# Code validate private/public IP acceptable ranges.
class IPAddr
PRIVATE_RANGES = [
IPAddr.new('10.0.0.0/8'),
IPAddr.new('172.16.0.0/12'),
IPAddr.new('192.168.0.0/16')
]

def private?
return false unless self.ipv4?
PRIVATE_RANGES.each do |ipr|
Expand Down

0 comments on commit 9ada599

Please sign in to comment.