forked from saurabh/personal-diploma
Fix vulnerable.
This commit is contained in:
parent
ee55f63fa8
commit
51a3909203
|
@ -14,7 +14,7 @@ class Admin::DiplomasController < OrbitMemberController
|
||||||
end
|
end
|
||||||
|
|
||||||
def new
|
def new
|
||||||
@member = MemberProfile.find_by(:uid=>params['uid']) rescue nil
|
@member = MemberProfile.find_by(:uid=>params['uid'].to_s) rescue nil
|
||||||
@diploma = Diploma.new
|
@diploma = Diploma.new
|
||||||
|
|
||||||
if params[:desktop]
|
if params[:desktop]
|
||||||
|
@ -139,7 +139,7 @@ class Admin::DiplomasController < OrbitMemberController
|
||||||
end
|
end
|
||||||
|
|
||||||
def frontend_setting
|
def frontend_setting
|
||||||
@member = MemberProfile.find_by(:uid=>params['uid']) rescue nil
|
@member = MemberProfile.find_by(:uid=>params['uid'].to_s) rescue nil
|
||||||
@intro = DiplomaIntro.find_by(:member_profile_id=>@member.id) rescue nil
|
@intro = DiplomaIntro.find_by(:member_profile_id=>@member.id) rescue nil
|
||||||
@intro = @intro.nil? ? DiplomaIntro.new({:member_profile_id=>@member.id}) : @intro
|
@intro = @intro.nil? ? DiplomaIntro.new({:member_profile_id=>@member.id}) : @intro
|
||||||
end
|
end
|
||||||
|
|
|
@ -58,7 +58,7 @@ class PersonalDiplomasController < ApplicationController
|
||||||
|
|
||||||
def show
|
def show
|
||||||
params = OrbitHelper.params
|
params = OrbitHelper.params
|
||||||
plugin = Diploma.where(:is_hidden=>false).find_by(uid: params[:uid])
|
plugin = Diploma.where(:is_hidden=>false).find_by(uid: params[:uid].to_s)
|
||||||
|
|
||||||
fields_to_show = [
|
fields_to_show = [
|
||||||
"name",
|
"name",
|
||||||
|
|
Loading…
Reference in New Issue