From 4bf882a389f8a8ef2641618728914c6bbc626770 Mon Sep 17 00:00:00 2001 From: bohung Date: Mon, 24 Oct 2022 16:25:33 +0800 Subject: [PATCH] Fix vulnerable. --- app/controllers/galleries_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/galleries_controller.rb b/app/controllers/galleries_controller.rb index b06a41a..5e78054 100644 --- a/app/controllers/galleries_controller.rb +++ b/app/controllers/galleries_controller.rb @@ -92,7 +92,7 @@ class GalleriesController < ApplicationController def show @album_setting = AlbumSetting.first params = OrbitHelper.params - album = Album.find_by_param(params[:uid]) + album = Album.find_by_param(params[:uid].to_s) flag = show_desc? colors = (AlbumColor.where(:album_id=> album.id).pluck(:color,:album_card_background_color,:album_card_text_color)[0])||[] rescue [] images = album.album_images.asc(:order).collect do |a|