mirror of
https://github.com/discourse/discourse.git
synced 2025-02-06 19:38:24 +00:00
Merge pull request #587 from mark-rushakoff/fix-symbol-leak
Don't call to_sym on param
This commit is contained in:
commit
621c89d396
@ -4,7 +4,7 @@ class EducationController < ApplicationController
|
||||
|
||||
def show
|
||||
raise Discourse::InvalidAccess.new unless params[:id] =~ /^[a-z0-9\-\_]+$/
|
||||
raise Discourse::NotFound.new unless I18n.t(:education).include?(params[:id].to_sym)
|
||||
raise Discourse::NotFound.new if I18n.t("education.#{params[:id]}", default: MISSING_KEY) == MISSING_KEY
|
||||
|
||||
education_posts_text = I18n.t('education.until_posts', count: SiteSetting.educate_until_posts)
|
||||
|
||||
@ -14,4 +14,7 @@ class EducationController < ApplicationController
|
||||
render text: PrettyText.cook(markdown_content)
|
||||
end
|
||||
|
||||
private
|
||||
MISSING_KEY = '_MISSING_KEY_'.freeze
|
||||
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user