mirror of
https://github.com/discourse/discourse.git
synced 2025-05-21 18:12:32 +08:00
correct information leak in page not found
This commit is contained in:
@ -278,9 +278,8 @@ class ApplicationController < ActionController::Base
|
||||
end
|
||||
|
||||
def render_not_found_page(status=404)
|
||||
f = Topic.where(deleted_at: nil, archetype: "regular")
|
||||
@latest = f.order('views desc').take(10)
|
||||
@recent = f.order('created_at desc').take(10)
|
||||
@top_viewed = TopicQuery.top_viewed(10)
|
||||
@recent = TopicQuery.recent(10)
|
||||
@slug = params[:slug].class == String ? params[:slug] : ''
|
||||
@slug = (params[:id].class == String ? params[:id] : '') if @slug.blank?
|
||||
@slug.gsub!('-',' ')
|
||||
|
Reference in New Issue
Block a user