Bugzilla – Attachment 162712 Details for
Bug 36084
Pass CSRF token to SVC scripts (1/2)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36084: Fix cookie domain for www/ tests
Bug-36084-Fix-cookie-domain-for-www-tests.patch (text/plain), 1.31 KB, created by
Tomás Cohen Arazi (tcohen)
on 2024-03-04 13:27:13 UTC
(
hide
)
Description:
Bug 36084: Fix cookie domain for www/ tests
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2024-03-04 13:27:13 UTC
Size:
1.31 KB
patch
obsolete
>From eec55cf57a5f25f0161126db7aa8bbe9c8564a13 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Mon, 4 Mar 2024 10:20:05 -0300 >Subject: [PATCH] Bug 36084: Fix cookie domain for www/ tests > >This patch changes the hardcoded `koha.local` value on >t::lib::Mocks::Zebra so tests don't fail when the domain is not `koha`. > >To test: >1. Run: > $ ktd --shell > k$ export KOHA_INTRANET_URL=http://kohadev-intra.myDNSname.org:8081 > k$ prove t/db_dependent/www/batch.t >=> FAIL: Tests fail! >2. Apply this patch >3. Repeat 1 >=> SUCCESS: Tests pass! >4. Sign off :-D > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > t/lib/Mocks/Zebra.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/t/lib/Mocks/Zebra.pm b/t/lib/Mocks/Zebra.pm >index a82750a2de4..ef27d36ec72 100644 >--- a/t/lib/Mocks/Zebra.pm >+++ b/t/lib/Mocks/Zebra.pm >@@ -142,7 +142,7 @@ sub load_records_ui { > $agent->follow_link_ok( { text => 'Stage records for import' }, > 'go to stage MARC' ); > >- my $session_id = $agent->cookie_jar->get_cookies('koha.local')->{CGISESSID}; >+ my $session_id = $agent->cookie_jar->get_cookies( $self->{intranet} )->{CGISESSID}; > my $csrf_token = Koha::Token->new->generate_csrf({session_id => $session_id}); > $agent->post( > "$cgi_root/tools/upload-file.pl?temp=1", >-- >2.44.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 36084
:
162108
|
162109
|
162110
|
162111
|
162112
|
162133
|
162147
|
162150
| 162712