Bug 28409: Adjust regression test

We are no longer expecting an URI escaped value but a corrected category
value, either 1 or 2.

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
(cherry picked from commit 72684085cf)
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
(cherry picked from commit 72684085cf)
This commit is contained in:
Jonathan Druart 2021-06-24 09:55:23 +02:00 committed by Wainui Witika-Park
parent 034a76eebb
commit befd3f8721
1 changed files with 1 additions and 1 deletions

View File

@ -237,7 +237,7 @@ subtest 'XSS vulnerabilities in pagination' => sub {
is( $alert_text, undef, 'No alert box displayed, even if evil intent' );
my $second_page = $driver->find_element('//div[@class="pages"]/span[@class="currentPage"]/following-sibling::a');
like( $second_page->get_attribute('href'), qr{category=2%22%3E%3Cscript%3Ealert%28%27booh%21%27%29%3C%2Fscript%3E}, 'The second page should display the variables and attributes correctly URI escaped' );
like( $second_page->get_attribute('href'), qr{(?|&)category=2(&|$)}, 'The second page should display category without the invalid value' );
push @cleanup, $patron, $patron->category, $patron->library;