|
Lines 195-201
subtest 'XSS vulnerabilities in pagination' => sub {
Link Here
|
| 195 |
{ |
195 |
{ |
| 196 |
class => 'Koha::Virtualshelves', |
196 |
class => 'Koha::Virtualshelves', |
| 197 |
value => { |
197 |
value => { |
| 198 |
category => 1, |
198 |
category => 2, |
| 199 |
allow_change_from_owner => 1, |
199 |
allow_change_from_owner => 1, |
| 200 |
allow_change_from_others => 0, |
200 |
allow_change_from_others => 0, |
| 201 |
owner => $patron->borrowernumber |
201 |
owner => $patron->borrowernumber |
|
Lines 209-215
subtest 'XSS vulnerabilities in pagination' => sub {
Link Here
|
| 209 |
$patron->set_password({ password => $password }); |
209 |
$patron->set_password({ password => $password }); |
| 210 |
$s->opac_auth( $patron->userid, $password ); |
210 |
$s->opac_auth( $patron->userid, $password ); |
| 211 |
|
211 |
|
| 212 |
my $public_lists = $s->opac_base_url . q|opac-shelves.pl?op=list&category=1|; |
212 |
my $public_lists = $s->opac_base_url . q|opac-shelves.pl?op=list&category=2|; |
| 213 |
$driver->get($public_lists); |
213 |
$driver->get($public_lists); |
| 214 |
|
214 |
|
| 215 |
$s->remove_error_handler; |
215 |
$s->remove_error_handler; |
|
Lines 218-224
subtest 'XSS vulnerabilities in pagination' => sub {
Link Here
|
| 218 |
is( $alert_text, undef, 'No alert box displayed' ); |
218 |
is( $alert_text, undef, 'No alert box displayed' ); |
| 219 |
|
219 |
|
| 220 |
my $booh_alert = 'booh!'; |
220 |
my $booh_alert = 'booh!'; |
| 221 |
$public_lists = $s->opac_base_url . qq|opac-shelves.pl?op=list&category=1"><script>alert('$booh_alert')</script>|; |
221 |
$public_lists = $s->opac_base_url . qq|opac-shelves.pl?op=list&category=2"><script>alert('$booh_alert')</script>|; |
| 222 |
$driver->get($public_lists); |
222 |
$driver->get($public_lists); |
| 223 |
|
223 |
|
| 224 |
$s->remove_error_handler; |
224 |
$s->remove_error_handler; |
| 225 |
- |
|
|