مراية لـ
https://github.com/postalserver/postal.git
تم المزامنة 2026-05-31 04:35:42 +00:00
refactor(helpers): escape interpolated values in select options
The endpoint and domain option helpers interpolated model attributes straight into an HTML string before marking the whole buffer html_safe. Wrap the interpolations in h() so untrusted attributes can't break out of the surrounding tag. Also stop the helpers glob in rails_helper from eagerly requiring _spec.rb files so helper specs can live under spec/helpers/, and add a small application helper spec covering the escape behaviour.
هذا الالتزام موجود في:
@@ -16,7 +16,7 @@ require "shoulda-matchers"
|
||||
DatabaseCleaner.allow_remote_database_url = true
|
||||
ActiveRecord::Base.logger = Logger.new("/dev/null")
|
||||
|
||||
Dir[File.expand_path("helpers/**/*.rb", __dir__)].each { |f| require f }
|
||||
Dir[File.expand_path("helpers/**/*.rb", __dir__)].reject { |f| f.end_with?("_spec.rb") }.each { |f| require f }
|
||||
|
||||
ActionMailer::Base.delivery_method = :test
|
||||
|
||||
|
||||
المرجع في مشكلة جديدة
حظر مستخدم