动态显示安全问题
This commit is contained in:
parent
5374addb5a
commit
d3ead651fe
|
@ -66,6 +66,8 @@ class OpenSourceProjectsController < ApplicationController
|
||||||
order(sort_clause).
|
order(sort_clause).
|
||||||
all
|
all
|
||||||
|
|
||||||
|
@bugs = @open_source_project.bugs.limit(6)
|
||||||
|
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html {
|
format.html {
|
||||||
render :layout => "base_opensource_p"
|
render :layout => "base_opensource_p"
|
||||||
|
|
|
@ -38,4 +38,12 @@ module OpenSourceProjectsHelper
|
||||||
def show_origin(url)
|
def show_origin(url)
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def show_description(bug, open_source_project)
|
||||||
|
description = BugToOsp.where("osp_id = ? and relative_memo_id = ?", open_source_project.id, bug.id).first.description
|
||||||
|
if description.nil? || description == ''
|
||||||
|
description = open_source_project.name + l(:label_bug)
|
||||||
|
end
|
||||||
|
description
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
class BugToOsp < ActiveRecord::Base
|
class BugToOsp < ActiveRecord::Base
|
||||||
# attr_accessible :title, :body
|
# attr_accessible :title, :body
|
||||||
|
belongs_to :open_source_project, :foreign_key => "osp_id"
|
||||||
|
belongs_to :bug, :class_name => 'RelativeMemo', :foreign_key => "relative_memo_id"
|
||||||
|
|
||||||
|
validates_presence_of :osp_id, :relative_memo_id
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -14,6 +14,10 @@ class OpenSourceProject < ActiveRecord::Base
|
||||||
has_many :apply_tips, :class_name => 'ApplyProjectMaster', :as => :apply, :dependent => :delete_all, :conditions => "#{ApplyProjectMaster.table_name}.status = 1"
|
has_many :apply_tips, :class_name => 'ApplyProjectMaster', :as => :apply, :dependent => :delete_all, :conditions => "#{ApplyProjectMaster.table_name}.status = 1"
|
||||||
has_many :applicants, :class_name => 'User', :through => :apply_tips, :source => :user
|
has_many :applicants, :class_name => 'User', :through => :apply_tips, :source => :user
|
||||||
|
|
||||||
|
has_many :bugs_to_osp, :class_name => 'BugToOsp', :foreign_key => 'osp_id', :dependent => :destroy
|
||||||
|
has_many :bugs, :through => :bugs_to_osp, :class_name => "RelativeMemo", :order => "#{RelativeMemo.table_name}.created_at DESC"
|
||||||
|
|
||||||
|
|
||||||
validates_uniqueness_of :name
|
validates_uniqueness_of :name
|
||||||
|
|
||||||
acts_as_taggable
|
acts_as_taggable
|
||||||
|
|
|
@ -11,6 +11,9 @@ class RelativeMemo < ActiveRecord::Base
|
||||||
|
|
||||||
has_many :no_uses, :as => :no_use, :dependent => :delete_all
|
has_many :no_uses, :as => :no_use, :dependent => :delete_all
|
||||||
|
|
||||||
|
has_many :bugs_to_osp, :class_name => 'BugToOsp', :foreign_key => 'relative_memo_id', :dependent => :destroy
|
||||||
|
|
||||||
|
|
||||||
acts_as_taggable
|
acts_as_taggable
|
||||||
|
|
||||||
validates_presence_of :subject
|
validates_presence_of :subject
|
||||||
|
|
|
@ -24,25 +24,29 @@
|
||||||
<div class="fixed"></div>
|
<div class="fixed"></div>
|
||||||
<div class="li_list" style="margin-top:10px;margin-left:10px">
|
<div class="li_list" style="margin-top:10px;margin-left:10px">
|
||||||
<ul style="list-style-type: square;">
|
<ul style="list-style-type: square;">
|
||||||
|
<% @bugs.each do |bug| %>
|
||||||
|
<li><span class="li_time">>[<%= show_description(bug, open_source_project) %>]</span><%= link_to bug.subject, bug.url %></li>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
<!-- <li><span class="li_time">>[DDoS漏洞]</span><a href="/vuldb/ssvid-62261" title="Cobbler 2.4.x - 2.6.x 本地文件包含">Cobbler 2.4.x - 2.6.x 本地文件包含</a></li> -->
|
<!-- <li><span class="li_time">>[DDoS漏洞]</span><a href="/vuldb/ssvid-62261" title="Cobbler 2.4.x - 2.6.x 本地文件包含">Cobbler 2.4.x - 2.6.x 本地文件包含</a></li> -->
|
||||||
|
|
||||||
<li><span class="li_time">>[OpenSSL漏洞]</span><a href="/vuldb/ssvid-62260" title="Ruby OpenSSL CA私钥伪造漏洞">Ruby OpenSSL CA私钥伪造漏洞</a></li>
|
<!-- <li><span class="li_time">>[OpenSSL漏洞]</span><a href="/vuldb/ssvid-62260" title="Ruby OpenSSL CA私钥伪造漏洞">Ruby OpenSSL CA私钥伪造漏洞</a></li> -->
|
||||||
|
|
||||||
<li><span class="li_time">>[远程溢出漏洞]</span><a href="/vuldb/ssvid-62259" title="Adobe Flash Player 整数堆栈下溢远程命令执行">Adobe Flash Player 远程命令执行</a></li>
|
<!-- <li><span class="li_time">>[远程溢出漏洞]</span><a href="/vuldb/ssvid-62259" title="Adobe Flash Player 整数堆栈下溢远程命令执行">Adobe Flash Player 远程命令执行</a></li> -->
|
||||||
|
|
||||||
<!-- <li><span class="li_time">14-05-07</span><a href="/vuldb/ssvid-62258" title="PHPDISK phpdisk_del_process.php SQL注入漏洞">PHPDISK phpdisk_del_process.php SQL注入漏洞</a></li> -->
|
<!-- <li><span class="li_time">14-05-07</span><a href="/vuldb/ssvid-62258" title="PHPDISK phpdisk_del_process.php SQL注入漏洞">PHPDISK phpdisk_del_process.php SQL注入漏洞</a></li> -->
|
||||||
|
|
||||||
<!-- <li><span class="li_time">[OpenSSL漏洞]</span><a href="/vuldb/ssvid-62257" title="BEESCMS 3.4 order_save.php SQL注入漏洞">BEESCMS 3.4 order_save.php SQL注入漏洞</a></li> -->
|
<!-- <li><span class="li_time">[OpenSSL漏洞]</span><a href="/vuldb/ssvid-62257" title="BEESCMS 3.4 order_save.php SQL注入漏洞">BEESCMS 3.4 order_save.php SQL注入漏洞</a></li> -->
|
||||||
|
|
||||||
<li ><span class="li_time">>[SQL注入漏洞]</span><a href="/vuldb/ssvid-62256" title="Apache/NGINX 下 PHP-FPM 或者 PHP-CGI 拒绝服务漏洞">Apache/NGINX 下 PHP-FPM </a></li>
|
<!-- <li ><span class="li_time">>[SQL注入漏洞]</span><a href="/vuldb/ssvid-62256" title="Apache/NGINX 下 PHP-FPM 或者 PHP-CGI 拒绝服务漏洞">Apache/NGINX 下 PHP-FPM </a></li> -->
|
||||||
|
|
||||||
<li><span class="li_time">>[SQL注入漏洞]</span><a href="/vuldb/ssvid-62250" title="AlienVault OSSIM SQL注入以及远程代码执行">AlienVault OSSIM SQL注入</a></li>
|
<!-- <li><span class="li_time">>[SQL注入漏洞]</span><a href="/vuldb/ssvid-62250" title="AlienVault OSSIM SQL注入以及远程代码执行">AlienVault OSSIM SQL注入</a></li> -->
|
||||||
|
|
||||||
<li><span class="li_time">>[DDoS漏洞]</span><a href="/vuldb/ssvid-62248" title="Eucalyptus Web Services拒绝服务漏洞">Eucalyptus Web Services</a></li>
|
<!-- <li><span class="li_time">>[DDoS漏洞]</span><a href="/vuldb/ssvid-62248" title="Eucalyptus Web Services拒绝服务漏洞">Eucalyptus Web Services</a></li> -->
|
||||||
|
|
||||||
<li ><span class="li_time">>[OpenSSL漏洞]</span><a href="/vuldb/ssvid-62245" title="Watchguard Fireware XTM OpenSSL TLS心跳信息泄漏漏洞"> Fireware XTM OpenSSL TLS</a></li>
|
<!-- <li ><span class="li_time">>[OpenSSL漏洞]</span><a href="/vuldb/ssvid-62245" title="Watchguard Fireware XTM OpenSSL TLS心跳信息泄漏漏洞"> Fireware XTM OpenSSL TLS</a></li> -->
|
||||||
|
|
||||||
<li ><span class="li_time">>[OpenSSL漏洞]</span><a href="/vuldb/ssvid-62244" title="SAP Sybase SQL Anywhere OpenSSL TLS泄漏漏洞">Sybase SQL Anywhere OpenSSL TLS</a></li>
|
<!-- <li ><span class="li_time">>[OpenSSL漏洞]</span><a href="/vuldb/ssvid-62244" title="SAP Sybase SQL Anywhere OpenSSL TLS泄漏漏洞">Sybase SQL Anywhere OpenSSL TLS</a></li> -->
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -417,7 +421,7 @@
|
||||||
</script>
|
</script>
|
||||||
<!--我是分割线2===================================================================================================!-->
|
<!--我是分割线2===================================================================================================!-->
|
||||||
<div class="borad-topic-count" style="margin-top:10px">
|
<div class="borad-topic-count" style="margin-top:10px">
|
||||||
<!-- 共有 <%= link_to memos.count %> 个贴子 -->
|
<!-- 共有 <%#= link_to memos.count %> 个贴子 -->
|
||||||
<span><h1 style="color:#7591cc;font-weight:900">全球热帖</h1></span>
|
<span><h1 style="color:#7591cc;font-weight:900">全球热帖</h1></span>
|
||||||
<span style="margin-top: -30px; margin-right:70px;float: right; display: block;"><%= link_to "更多>>", :controller => "open_source_projects",:action => "showmemo", :id => @open_source_project.id %></span>
|
<span style="margin-top: -30px; margin-right:70px;float: right; display: block;"><%= link_to "更多>>", :controller => "open_source_projects",:action => "showmemo", :id => @open_source_project.id %></span>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1906,4 +1906,5 @@ zh:
|
||||||
|
|
||||||
# ajax异步验证
|
# ajax异步验证
|
||||||
modal_valid_passing: 可以使用
|
modal_valid_passing: 可以使用
|
||||||
|
label_bug: 漏洞
|
||||||
|
|
Loading…
Reference in New Issue