fix vulnerabilities
CI / scan_ruby (push) Successful in 23s
CI / scan_js (push) Failing after 10s
CI / lint (push) Failing after 19s
CI / test (push) Failing after 16s
CI / system-test (push) Failing after 15s

This commit is contained in:
2026-01-26 21:38:17 +01:00
parent 35f10c4bda
commit a69be52b72
6 changed files with 54 additions and 17 deletions
+7 -1
View File
@@ -2,7 +2,7 @@ class EntriesController < ApplicationController
before_action :set_entry, only: [ :show, :edit, :update ]
def index
@language_code = params[:language].presence
@language_code = validate_language_code(params[:language].presence)
@category = params[:category].presence
@query = params[:q].to_s.strip
@starts_with = params[:starts_with].presence
@@ -79,4 +79,10 @@ class EntriesController < ApplicationController
def entry_params
params.require(:entry).permit(:category)
end
def validate_language_code(code)
return nil if code.blank?
SupportedLanguage.valid_codes.include?(code) ? code : nil
end
end