From 3783dd2bcea4d24ade2e1b787acdfb5315024b92 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Fri, 23 Jun 2023 09:56:40 +0000 Subject: [PATCH] Bug 34426: (QA follow-up) Polishing xt script Test plan: Run it again. Same results? Signed-off-by: Marcel de Rooy --- xt/find-missing-csrf.t | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/xt/find-missing-csrf.t b/xt/find-missing-csrf.t index 14e1d09f44c..15dd6ae6265 100755 --- a/xt/find-missing-csrf.t +++ b/xt/find-missing-csrf.t @@ -1,5 +1,7 @@ #!/usr/bin/perl +# Copyright 2021 Koha development team +# # This file is part of Koha. # # Koha is free software; you can redistribute it and/or modify it @@ -63,19 +65,17 @@ sub check_csrf_in_forms { my @lines = read_file($file); my @errors; return @errors unless grep { $_ =~ m| starting on line $open is missing it's corresponding csrf_token include (see bug 22990)" - if !$found; - - # reset - ( $open, $found, $closed ) = ( 0, 0, 0 ); + $open = $line if ( $l =~ m{ starting on line $open is missing it's corresponding csrf_token include (see bug 22990)" + if !$found; + $found = 0; } } return @errors; -- 2.41.0