forked from saurabh/personal-honor
Fix vulnerable.
This commit is contained in:
parent
8a8de1f5b6
commit
0654a6a6a7
|
@ -14,7 +14,7 @@ class Admin::HonorsController < OrbitMemberController
|
|||
end
|
||||
|
||||
def new
|
||||
@member = MemberProfile.find_by(:uid=>params['uid']) rescue nil
|
||||
@member = MemberProfile.find_by(:uid=>params['uid'].to_s) rescue nil
|
||||
@honor = Honor.new
|
||||
|
||||
if params[:desktop]
|
||||
|
@ -162,7 +162,7 @@ class Admin::HonorsController < OrbitMemberController
|
|||
end
|
||||
|
||||
def frontend_setting
|
||||
@member = MemberProfile.find_by(:uid=>params['uid']) rescue nil
|
||||
@member = MemberProfile.find_by(:uid=>params['uid'].to_s) rescue nil
|
||||
@intro = HonorIntro.find_by(:member_profile_id=>@member.id) rescue nil
|
||||
@intro = @intro.nil? ? HonorIntro.new({:member_profile_id=>@member.id}) : @intro
|
||||
end
|
||||
|
|
|
@ -73,7 +73,7 @@ class PersonalHonorsController < ApplicationController
|
|||
|
||||
def show
|
||||
params = OrbitHelper.params
|
||||
plugin = Honor.where(:is_hidden=>false).find_by(uid: params[:uid])
|
||||
plugin = Honor.where(:is_hidden=>false).find_by(uid: params[:uid].to_s)
|
||||
fields_to_show = [
|
||||
"year",
|
||||
"honor_type",
|
||||
|
|
Loading…
Reference in New Issue