forked from saurabh/personal-lab
Fix vulnerable.
This commit is contained in:
parent
f1b91eea20
commit
eb8ed7476d
|
@ -14,7 +14,7 @@ class Admin::LabsController < 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
|
||||||
@lab = Lab.new
|
@lab = Lab.new
|
||||||
if params[:desktop]
|
if params[:desktop]
|
||||||
render :layout => false
|
render :layout => false
|
||||||
|
@ -160,7 +160,7 @@ class Admin::LabsController < 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 = LabIntro.find_by(:member_profile_id=>@member.id) rescue nil
|
@intro = LabIntro.find_by(:member_profile_id=>@member.id) rescue nil
|
||||||
@intro = @intro.nil? ? LabIntro.new({:member_profile_id=>@member.id}) : @intro
|
@intro = @intro.nil? ? LabIntro.new({:member_profile_id=>@member.id}) : @intro
|
||||||
end
|
end
|
||||||
|
|
|
@ -28,7 +28,7 @@ class PersonalLabsController < ApplicationController
|
||||||
|
|
||||||
def show
|
def show
|
||||||
params = OrbitHelper.params
|
params = OrbitHelper.params
|
||||||
plugin = Lab.where(:is_hidden=>false).find_by(uid: params[:uid])
|
plugin = Lab.where(:is_hidden=>false).find_by(uid: params[:uid].to_s)
|
||||||
fields_to_show = [
|
fields_to_show = [
|
||||||
"lab_title",
|
"lab_title",
|
||||||
"location",
|
"location",
|
||||||
|
|
Loading…
Reference in New Issue