Skip to content

Commit b6cc12e

Browse files
Potential fix for code scanning alert no. 14: Incomplete regular expression for hostnames
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
1 parent 6dd24c7 commit b6cc12e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/sandbox/test/rendering_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ def test_renders_component_without_format
372372

373373
def test_renders_component_with_asset_url
374374
component = AssetComponent.new
375-
assert_match(%r{http://assets.example.com/assets/application-\w+.css}, render_inline(component).text)
375+
assert_match(%r{http://assets\.example\.com/assets/application-\w+\.css}, render_inline(component).text)
376376

377377
if Rails.version.to_f < 8.0
378378
# Propshaft doesn't allow setting custom hosts so this only works in Rails < 8

0 commit comments

Comments
 (0)