config_server_agent 0.3.7 → 0.3.8

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: 1a3e3808d15e83db93422a44e1c853e9e734fff991419c9b091398ec40da6bd4
4
- data.tar.gz: d4b407b4cb7289809eed5c792e2631f7293dcfbd7c1bc8574712b6740a953c64
3
+ metadata.gz: 76a3615bd2968fdf6a96cf2ec723df57b7c88f66aa559ac1517429b668903009
4
+ data.tar.gz: 1bbff77e71428bf4a7ab3bb6bdc567d4e0dc03c90af8b19720f0574a7b251a6c
5
5
  SHA512:
6
- metadata.gz: 5660ec66ec50937970dd617c14e536eca6cdc05f676d62599ad1c92d4cd2564472794f76ad2dcca5e2c80df735965a0cd0a07fe2b837f1f01d18b3f160fd51aa
7
- data.tar.gz: 2b50f65285399fde0581726d4f257fccefeb238ce803f882bec5cf6ecd60a4a79d29c22f23cd9e9989f2e6f22ff88981ce2595e47efbc6d620f0af8213d00719
6
+ metadata.gz: 3ed40e76e65941e4a50e44d25d051fad0b2c0705dd3c3946ea1072e8a0ff28db985dce68b18bd6b276c941fcba0720a34fb1258380bc717c7da810914c3b2db4
7
+ data.tar.gz: a8980371e9cf8bea67a0ae43ab0548ac9759f349ba789b768bff4831dbad6c6e14511116e916a4a2b261f9b780a5aee364033773900de544f693e9d122478f10
data/CHANGELOG.md CHANGED
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
4
4
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5
5
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
+ ## 0.3.8
8
+ ### Changed
9
+ - More resiliant cache file permission handling
10
+
7
11
  ## 0.3.7
8
12
  ### Changed
9
13
  - Fixed content-type handling
@@ -1,3 +1,3 @@
1
1
  class ConfigServerAgent
2
- VERSION = '0.3.7'
2
+ VERSION = '0.3.8'
3
3
  end
@@ -177,7 +177,17 @@ class ConfigServerAgent
177
177
  'token' => @token,
178
178
  'token_expires' => @token_expires
179
179
  }.to_json)
180
- FileUtils.chmod 'ug=rw,o=', @cache_file
180
+
181
+ # Check if o+wr bits are set on the cache file
182
+ if File.stat(@cache_file).mode & 06 > 0
183
+ begin
184
+ # Attempt to remove them if they are...
185
+ File.chmod 0660, @cache_file
186
+ rescue Errno::EPERM => e
187
+ # But don't raise an error if it fails because the file may have been created by another user
188
+ warn "File permissions are too open: #{@cache_file} - #{e.message}"
189
+ end
190
+ end
181
191
  end
182
192
  end
183
193
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: config_server_agent
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.7
4
+ version: 0.3.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aidan Samuel
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-07-17 00:00:00.000000000 Z
11
+ date: 2019-07-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: lockfile