forked from saurabh/personal-research
Fix vulnerable.
This commit is contained in:
parent
c1c1af1b74
commit
2fa9d31762
|
@ -14,7 +14,7 @@ class Admin::ResearchsController < 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
|
||||||
@research = Research.new
|
@research = Research.new
|
||||||
if params[:desktop]
|
if params[:desktop]
|
||||||
render :layout => false
|
render :layout => false
|
||||||
|
@ -162,7 +162,7 @@ class Admin::ResearchsController < 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 = ResearchIntro.find_by(:member_profile_id=>@member.id) rescue nil
|
@intro = ResearchIntro.find_by(:member_profile_id=>@member.id) rescue nil
|
||||||
@intro = @intro.nil? ? ResearchIntro.new({:member_profile_id=>@member.id}) : @intro
|
@intro = @intro.nil? ? ResearchIntro.new({:member_profile_id=>@member.id}) : @intro
|
||||||
end
|
end
|
||||||
|
|
|
@ -28,7 +28,7 @@ class PersonalResearchesController < ApplicationController
|
||||||
|
|
||||||
def show
|
def show
|
||||||
params = OrbitHelper.params
|
params = OrbitHelper.params
|
||||||
plugin = Research.where(:is_hidden=>false).find_by(uid: params[:uid])
|
plugin = Research.where(:is_hidden=>false).find_by(uid: params[:uid].to_s)
|
||||||
fields_to_show =[
|
fields_to_show =[
|
||||||
"year",
|
"year",
|
||||||
"research_category",
|
"research_category",
|
||||||
|
|
Loading…
Reference in New Issue