muck-raker 0.1.29 → 0.1.30
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.
- data/VERSION +1 -1
- data/app/controllers/muck/recommendations_controller.rb +4 -3
- data/muck-raker.gemspec +1 -1
- metadata +1 -1
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.30
|
@@ -8,7 +8,7 @@ class Muck::RecommendationsController < ApplicationController
|
|
8
8
|
@details = params[:details] == "true"
|
9
9
|
|
10
10
|
@uri = params[:u] || request.env['HTTP_REFERER']
|
11
|
-
if !allowed_uri(@uri)
|
11
|
+
if @uri.blank? || !allowed_uri(@uri)
|
12
12
|
render :text => '<!-- permission denied -->'
|
13
13
|
return
|
14
14
|
end
|
@@ -29,13 +29,13 @@ class Muck::RecommendationsController < ApplicationController
|
|
29
29
|
respond_to do |format|
|
30
30
|
format.html {
|
31
31
|
order = params[:order] || "mixed"
|
32
|
-
redirect_to resource_path(@entry) + "?limit
|
32
|
+
redirect_to resource_path(@entry) + "?limit=#{@limit}&order=#{order}&details=#{@details}" if !@entry.id.nil?
|
33
33
|
}
|
34
34
|
format.xml {
|
35
35
|
render(:template => @entry.id.nil? ? '/recommendations/index_real_time.xml.builder' : '/recommendations/index.xml.builder', :layout => false)
|
36
36
|
}
|
37
37
|
format.pjs {
|
38
|
-
@host = "http
|
38
|
+
@host = "http://#{URI.parse(@uri).host}"
|
39
39
|
render(:template => @entry.id.nil? ? 'recommendations/index_real_time.pjs.erb' : 'recommendations/index.pjs.erb', :layout => false)
|
40
40
|
}
|
41
41
|
format.rss {
|
@@ -47,6 +47,7 @@ class Muck::RecommendationsController < ApplicationController
|
|
47
47
|
protected
|
48
48
|
|
49
49
|
def allowed_uri(uri)
|
50
|
+
return false if uri.blank?
|
50
51
|
uri.match(/^(10\.|192\.168|172\.|127\.)/) == nil && uri.include?('localhost') == false
|
51
52
|
end
|
52
53
|
|
data/muck-raker.gemspec
CHANGED