Lines 251-257
subtest 'XSS vulnerabilities in pagination' => sub {
Link Here
|
251 |
is( $alert_text, undef, 'No alert box displayed, even if evil intent' ); |
251 |
is( $alert_text, undef, 'No alert box displayed, even if evil intent' ); |
252 |
|
252 |
|
253 |
my $second_page = $driver->find_element('//div[@class="pages"]/span[@class="currentPage"]/following-sibling::a'); |
253 |
my $second_page = $driver->find_element('//div[@class="pages"]/span[@class="currentPage"]/following-sibling::a'); |
254 |
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' ); |
254 |
like( $second_page->get_attribute('href'), qr{(?|&)category=2(&|$)}, 'The second page should display category without the invalid value' ); |
255 |
|
255 |
|
256 |
push @cleanup, $patron, $patron->category, $patron->library; |
256 |
push @cleanup, $patron, $patron->category, $patron->library; |
257 |
|
257 |
|
258 |
- |
|
|