burp_cms 1.3.16 → 1.3.17
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/burp/page_model.rb +2 -2
- data/config/routes.rb +2 -2
- data/lib/burp/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 98b38ae650ebcf87c3bf63e4a37f12ac7e658b51
|
4
|
+
data.tar.gz: af03cb6ccf0ecb479013f62552e9f87ca9ade19d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5c870144558df74614a1c5064a553c746a6f326a0da38b963507747ed77e4cfbb62c862ed4a77a5c505d335051c6717514dbad9321907b7c8a7ddef5bfb56240
|
7
|
+
data.tar.gz: e82896d8f9d0f25ef549dbaf7b22ee4b3d839ef006e6c32a12d7a53afe78c5cac58fc86712e2421892a3b74143f215f99f7455522cae71bcdca060870401b549
|
@@ -11,8 +11,8 @@ module Burp
|
|
11
11
|
attr_accessor :path, :title, :snippets
|
12
12
|
|
13
13
|
validates_presence_of :path, :message => "You must enter a path"
|
14
|
-
validates :path, :format => { :with =>
|
15
|
-
validates :path, :format => { :with =>
|
14
|
+
validates :path, :format => { :with => /\A\//, :message => "Must start with a slash" }
|
15
|
+
validates :path, :format => { :with => /\A[a-zA-Z0-9\-\.\/]+\z/, :message => "Invalid path" }
|
16
16
|
validate do
|
17
17
|
if File.exist?("#{on_disk_path}/page.json") && @original_path != path
|
18
18
|
errors.add(:path, "Path already taken, #{path}")
|
data/config/routes.rb
CHANGED
@@ -20,11 +20,11 @@ Burp::Engine.routes.draw do
|
|
20
20
|
end
|
21
21
|
|
22
22
|
# Catch all to 404 error
|
23
|
-
|
23
|
+
get "/*path" => "error#no_such_page"
|
24
24
|
|
25
25
|
end
|
26
26
|
|
27
27
|
Rails.application.routes.draw do
|
28
28
|
mount Burp::Engine => "/burp"
|
29
|
-
|
29
|
+
get '/:path' => 'burp/catch_all#show', :constraints => { :path => /.*/ }
|
30
30
|
end
|
data/lib/burp/version.rb
CHANGED