projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
deny remote access to elements/*html, RT#23357
[freeside.git]
/
rt
/
t
/
web
/
csrf.t
diff --git
a/rt/t/web/csrf.t
b/rt/t/web/csrf.t
index
d99b4ce
..
9d95d06
100644
(file)
--- a/
rt/t/web/csrf.t
+++ b/
rt/t/web/csrf.t
@@
-1,4
+1,3
@@
-#!/usr/bin/perl
use strict;
use warnings;
use strict;
use warnings;
@@
-100,9
+99,9
@@
$m->title_is('Possible cross-site request forgery');
my $link = $m->find_link(text_regex => qr{resume your request});
(my $broken_url = $link->url) =~ s/(CSRF_Token)=\w+/$1=crud/;
$m->get_ok($broken_url);
my $link = $m->find_link(text_regex => qr{resume your request});
(my $broken_url = $link->url) =~ s/(CSRF_Token)=\w+/$1=crud/;
$m->get_ok($broken_url);
-$m->content_
contains("Queue could not be loaded"
);
+$m->content_
like(qr/Queue\s+could not be loaded/
);
$m->title_is('RT Error');
$m->title_is('RT Error');
-$m->warning_like(qr/Queue
could not be loaded/);
+$m->warning_like(qr/Queue
\s+
could not be loaded/);
# The token doesn't work for other pages, or other arguments to the same page.
$m->add_header(Referer => undef);
# The token doesn't work for other pages, or other arguments to the same page.
$m->add_header(Referer => undef);
@@
-135,7
+134,7
@@
$m->content_contains("Create a new ticket", 'ticket create page');
$m->form_name('TicketCreate');
$m->field('Subject', 'Attachments test');
$m->form_name('TicketCreate');
$m->field('Subject', 'Attachments test');
-my $logofile = "$RT::
MasonComponentRoot/NoAu
th/images/bpslogo.png";
+my $logofile = "$RT::
StaticPa
th/images/bpslogo.png";
open LOGO, "<", $logofile or die "Can't open logo file: $!";
binmode LOGO;
my $logo_contents = do {local $/; <LOGO>};
open LOGO, "<", $logofile or die "Can't open logo file: $!";
binmode LOGO;
my $logo_contents = do {local $/; <LOGO>};