public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/openqa] rawhide: Backport PR #7634 to fix build with Mojo 9.48+
@ 2026-07-21 22:34 Adam Williamson
  0 siblings, 0 replies; only message in thread
From: Adam Williamson @ 2026-07-21 22:34 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/openqa
Branch : rawhide
Commit : 6831114203020374ce974a4077cbba242ee6596f
Author : Adam Williamson <awilliam@redhat.com>
Date   : 2026-07-21T15:34:30-07:00
Stats  : +33/-0 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/openqa/c/6831114203020374ce974a4077cbba242ee6596f?branch=rawhide

Log:
Backport PR #7634 to fix build with Mojo 9.48+

---
diff --git a/0001-fix-test-Drop-test-for-token-equality.patch b/0001-fix-test-Drop-test-for-token-equality.patch
new file mode 100644
index 0000000..47dce1a
--- /dev/null
+++ b/0001-fix-test-Drop-test-for-token-equality.patch
@@ -0,0 +1,30 @@
+From 8d6558680caffaafa4828a08c48a0a4cac4839e1 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Tina=20M=C3=BCller?= <tina.mueller@suse.com>
+Date: Fri, 17 Jul 2026 14:42:07 +0200
+Subject: [PATCH] fix(test): Drop test for token equality
+
+Due to security, CSRF tokens in Mojolicious 9.48 are now different with every
+request and even every form element, so it does not make sense to compare
+them anymore.
+
+Issue: https://progress.opensuse.org/issues/204255
+---
+ t/ui/02-csrf.t | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/t/ui/02-csrf.t b/t/ui/02-csrf.t
+index 54451a217..d5ffd7493 100644
+--- a/t/ui/02-csrf.t
++++ b/t/ui/02-csrf.t
+@@ -31,8 +31,6 @@ $t->get_ok('/api_keys');
+ ok $token =~ /[0-9a-z]{40}/, 'csrf token in meta tag';
+ ok $t->tx->res->dom->at('meta[name=csrf-param]')->attr('content') eq 'csrf_token', 'csrf param in meta tag';
+ 
+-is $token, $t->tx->res->dom->at('form input[name=csrf_token]')->{value}, 'token is the same in form';
+-
+ # test cancel with and without CSRF token
+ $t->post_ok('/api/v1/jobs/99928/cancel' => form => {csrf_token => 'foobar'})->status_is(403);
+ $t->post_ok('/api/v1/jobs/99928/cancel' => {'X-CSRF-Token' => $token} => form => {})->status_is(200);
+-- 
+2.54.0
+

diff --git a/openqa.spec b/openqa.spec
index 6b42788..8962b0f 100644
--- a/openqa.spec
+++ b/openqa.spec
@@ -147,6 +147,9 @@ Patch:          0001-t-Skip-earlier-in-tests_dependencies.t.patch
 # https://github.com/os-autoinst/openQA/pull/7509
 # Support invent.kde.org as a bug tracker (for bug links)
 Patch:          0001-fix-Support-invent.kde.org-and-work_items-in-bug-URL.patch
+# https://github.com/os-autoinst/openQA/pull/7634
+# Drop token equality test that is invalid with Mojolicious 9.48+
+Patch:          0001-fix-test-Drop-test-for-token-equality.patch
 
 BuildRequires: make
 BuildRequires:  %{python_scripts_requires}

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-07-21 22:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-21 22:34 [rpms/openqa] rawhide: Backport PR #7634 to fix build with Mojo 9.48+ Adam Williamson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox