mirror of
https://github.com/linuxserver/Heimdall.git
synced 2026-02-21 12:10:34 +09:00
fix: Escape app title and tag title on list pages CVE-2022-47968 (#1088)
This commit is contained in:
@@ -31,4 +31,15 @@ class ItemListTest extends TestCase
|
||||
$response->assertSee('Item 2');
|
||||
$response->assertSee('Item 3');
|
||||
}
|
||||
|
||||
public function test_escapes_xss_on_the_item_list_page()
|
||||
{
|
||||
$this->addItemWithTitleToDB('<script>alert("XSS")</script>');
|
||||
|
||||
$response = $this->get('/items');
|
||||
|
||||
$response->assertStatus(200);
|
||||
$response->assertDontSee('<script>alert("XSS")</script>', false);
|
||||
$response->assertSee('<script>alert("XSS")</script>');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,4 +32,15 @@ class TagListTest extends TestCase
|
||||
$response->assertSee('Tag 2');
|
||||
$response->assertSee('Tag 3');
|
||||
}
|
||||
|
||||
public function test_escapes_xss_on_the_tag_list_page()
|
||||
{
|
||||
$this->addTagWithTitleToDB('<script>alert("XSS")</script>');
|
||||
|
||||
$response = $this->get('/tags');
|
||||
|
||||
$response->assertStatus(200);
|
||||
$response->assertDontSee('<script>alert("XSS")</script>', false);
|
||||
$response->assertSee('<script>alert("XSS")</script>');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user