page_print 0.1.8 → 0.1.10

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.
@@ -45,11 +45,14 @@ module PagePrint
45
45
  return unless public_path
46
46
 
47
47
  relative_path = path.delete_prefix('/')
48
- file_path = public_path.join(relative_path).cleanpath
48
+ public_path = public_path.realpath
49
+ file_path = public_path.join(relative_path).realpath
49
50
  return unless inside_path?(file_path, public_path)
50
51
  return unless file_path.file?
51
52
 
52
53
  resource(File.binread(file_path), file_path.extname)
54
+ rescue Errno::ENOENT, Errno::EACCES, Errno::ELOOP
55
+ nil
53
56
  end
54
57
 
55
58
  def read_resolved_asset(path)
@@ -1,3 +1,3 @@
1
1
  module PagePrint
2
- VERSION = '0.1.8'
2
+ VERSION = '0.1.10'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: page_print
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8
4
+ version: 0.1.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dino Maric
@@ -20,6 +20,8 @@ extra_rdoc_files: []
20
20
  files:
21
21
  - LICENSE
22
22
  - README.md
23
+ - docs/configuration.md
24
+ - docs/production.md
23
25
  - ext/page_print/extconf.rb
24
26
  - ext/page_print/page_print.c
25
27
  - lib/page_print.rb