burp_cms 1.3.25 → 1.3.26
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +14 -6
- data/app/controllers/burp/files_controller.rb +17 -4
- data/lib/burp/version.rb +1 -1
- metadata +25 -25
checksums.yaml
CHANGED
@@ -1,7 +1,15 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
NDJhNzg0NjA5MDMxZTVjYmQyYzlhOWZhYzg1YjBmMTNiMzk3N2E2NA==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
M2RiYTJjNDBhNjUxZTE4YWQ5YjY0NTQ3MTlkNWMyYWNiYmE5NmE3ZA==
|
7
|
+
!binary "U0hBNTEy":
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
ZGY2NzhhZWUyMjE1YWVkNDBkNzdiMWU2YzkwYmFjYjY0ZTRjMDM3MDg0NGYz
|
10
|
+
YWFjNzU1ZWJjNjc2ZDI3M2Q0MTM5MGI1NjE4MzRjZTUyNjkyNDliZmYzOWEx
|
11
|
+
NDQwNDY4MzExOGY3NjNiMDY1OWQ0NmM3ZmU5MTYxZjE1YjQ3Yjk=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
ZDE1ZGJlN2UwYTQxMjFjMDFiMWY1YzAxODEzY2VlZDUwYzcwN2NhNTQzZTIy
|
14
|
+
YjM5OGMwOTA2YTVhNzQwNzY5YzE4OTdkNGVmMTQyYTJhNzY0NDM1MzY2MzAz
|
15
|
+
ZGNhNTQ3YzQ0OWRmNTVlN2MxNjVmNmU0OWMxMDNlYmQ1Mzg5ZjM=
|
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
# encoding: UTF-8
|
2
2
|
require 'fileutils'
|
3
3
|
|
4
4
|
module Burp
|
@@ -65,12 +65,14 @@ module Burp
|
|
65
65
|
if errors.length > 0
|
66
66
|
render :json => {:errors => errors}
|
67
67
|
else
|
68
|
+
target_path = upload_directory_path + make_url_safe(File.basename(file.path))
|
69
|
+
|
68
70
|
FileUtils.mkdir_p(upload_directory_path)
|
69
|
-
FileUtils.mv(file.path,
|
71
|
+
FileUtils.mv(file.path, target_path)
|
70
72
|
|
71
|
-
Burp::Util.create_smaller_images(
|
73
|
+
Burp::Util.create_smaller_images(target_path) if target_path.match(/(jpg|jpeg|gif|png)$/i)
|
72
74
|
|
73
|
-
Util.commit("Burp: file upload"
|
75
|
+
Util.commit("Burp: file upload", :path => upload_directory_path)
|
74
76
|
render :json => {:success => true}
|
75
77
|
end
|
76
78
|
end
|
@@ -80,6 +82,17 @@ module Burp
|
|
80
82
|
|
81
83
|
private
|
82
84
|
|
85
|
+
FROM_CHARACTERS = " ÀÁÂÃàáâãÇçĆćČčÐðÈÉÊËèéêëÌÍÎÏìíîïŁłÑñŃńÒÓÔòóôŘřŚśšÙÚÛùúûÜÝüýÅåÄÆäæÖØöø"
|
86
|
+
TO_CHARACTERS = "-AAAAaaaaCcCcCcDdEEEEeeeeIIIIiiiillNnNnOOOoooRrSssUUUuuuUYuyAaAAaaOOoo"
|
87
|
+
OTHER = "̌̀̂́̊̈ ̃ ̧"
|
88
|
+
|
89
|
+
def make_url_safe(file_name)
|
90
|
+
file_name.chars.map do |char|
|
91
|
+
i = FROM_CHARACTERS.index(char)
|
92
|
+
i ? TO_CHARACTERS[i] : (OTHER.include?(char) ? "" : char)
|
93
|
+
end.join('')
|
94
|
+
end
|
95
|
+
|
83
96
|
def disposition(file_path)
|
84
97
|
file_path.match(/\.(png|jpeg|gif|jpg|pdf|txt)$/) && !params.has_key?(:download) ? 'inline' : 'attachment'
|
85
98
|
end
|
data/lib/burp/version.rb
CHANGED
metadata
CHANGED
@@ -1,125 +1,125 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: burp_cms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.26
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Darwin
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-09-
|
11
|
+
date: 2013-09-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jquery-rails
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - '>='
|
17
|
+
- - ! '>='
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - '>='
|
24
|
+
- - ! '>='
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: jquery-ui-rails
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - '>='
|
31
|
+
- - ! '>='
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - '>='
|
38
|
+
- - ! '>='
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: less-rails
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - '>='
|
45
|
+
- - ! '>='
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '0'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - '>='
|
52
|
+
- - ! '>='
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: mayi
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - '>='
|
59
|
+
- - ! '>='
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '0'
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- - '>='
|
66
|
+
- - ! '>='
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: therubyracer
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- - '>='
|
73
|
+
- - ! '>='
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: '0'
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- - '>='
|
80
|
+
- - ! '>='
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: bootstrap_forms
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- - '>='
|
87
|
+
- - ! '>='
|
88
88
|
- !ruby/object:Gem::Version
|
89
89
|
version: '0'
|
90
90
|
type: :runtime
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- - '>='
|
94
|
+
- - ! '>='
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: term-ansicolor
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
|
-
- - '>='
|
101
|
+
- - ! '>='
|
102
102
|
- !ruby/object:Gem::Version
|
103
103
|
version: '0'
|
104
104
|
type: :runtime
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
|
-
- - '>='
|
108
|
+
- - ! '>='
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0'
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: rmagick
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
|
-
- - '>='
|
115
|
+
- - ! '>='
|
116
116
|
- !ruby/object:Gem::Version
|
117
117
|
version: '0'
|
118
118
|
type: :runtime
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
|
-
- - '>='
|
122
|
+
- - ! '>='
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '0'
|
125
125
|
- !ruby/object:Gem::Dependency
|
@@ -140,14 +140,14 @@ dependencies:
|
|
140
140
|
name: rspec
|
141
141
|
requirement: !ruby/object:Gem::Requirement
|
142
142
|
requirements:
|
143
|
-
- - '>='
|
143
|
+
- - ! '>='
|
144
144
|
- !ruby/object:Gem::Version
|
145
145
|
version: '0'
|
146
146
|
type: :development
|
147
147
|
prerelease: false
|
148
148
|
version_requirements: !ruby/object:Gem::Requirement
|
149
149
|
requirements:
|
150
|
-
- - '>='
|
150
|
+
- - ! '>='
|
151
151
|
- !ruby/object:Gem::Version
|
152
152
|
version: '0'
|
153
153
|
- !ruby/object:Gem::Dependency
|
@@ -168,14 +168,14 @@ dependencies:
|
|
168
168
|
name: bundler
|
169
169
|
requirement: !ruby/object:Gem::Requirement
|
170
170
|
requirements:
|
171
|
-
- - '>='
|
171
|
+
- - ! '>='
|
172
172
|
- !ruby/object:Gem::Version
|
173
173
|
version: '0'
|
174
174
|
type: :development
|
175
175
|
prerelease: false
|
176
176
|
version_requirements: !ruby/object:Gem::Requirement
|
177
177
|
requirements:
|
178
|
-
- - '>='
|
178
|
+
- - ! '>='
|
179
179
|
- !ruby/object:Gem::Version
|
180
180
|
version: '0'
|
181
181
|
- !ruby/object:Gem::Dependency
|
@@ -192,7 +192,7 @@ dependencies:
|
|
192
192
|
- - ~>
|
193
193
|
- !ruby/object:Gem::Version
|
194
194
|
version: 1.8.4
|
195
|
-
description: ' A CMS that tries hard to not get in your way! '
|
195
|
+
description: ! ' A CMS that tries hard to not get in your way! '
|
196
196
|
email: darwin@bits2life.com
|
197
197
|
executables: []
|
198
198
|
extensions: []
|
@@ -399,12 +399,12 @@ require_paths:
|
|
399
399
|
- lib
|
400
400
|
required_ruby_version: !ruby/object:Gem::Requirement
|
401
401
|
requirements:
|
402
|
-
- - '>='
|
402
|
+
- - ! '>='
|
403
403
|
- !ruby/object:Gem::Version
|
404
404
|
version: '0'
|
405
405
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
406
406
|
requirements:
|
407
|
-
- - '>='
|
407
|
+
- - ! '>='
|
408
408
|
- !ruby/object:Gem::Version
|
409
409
|
version: '0'
|
410
410
|
requirements: []
|