https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37192

            Bug ID: 37192
           Summary: The item editor Action menu Print label fails because
                    the op to add to a label batch is now cud-add
 Change sponsored?: ---
           Product: Koha
           Version: Main
          Hardware: All
                OS: All
            Status: NEW
          Keywords: regression
          Severity: major
          Priority: P5 - low
         Component: Label/patron card printing
          Assignee: [email protected]
          Reporter: [email protected]
        QA Contact: [email protected]
                CC: [email protected]
        Depends on: 36192

Steps to reproduce:

1. Search the catalog for anything with results, click Edit items on any bib
with 
   an existing item.
2. Click the Actions menu at the left of any item, select Print label

That 500 error you just saw happened because the Print label action opens a
popup at
/cgi-bin/koha/labels/label-edit-batch.pl?op=add&number_type=itemnumber&number_list=633
which used to create a new label batch with that item in it, but now falls
through the code past the "$op eq cud-add" because other parts of the label
batch UI want to POST things to add so the op changed to cud-add, and the
attempt to add winds up in code that thinks you are editing an existing batch,
and makes crashing assumptions about what will be defined.

Given that we don't believe that creating a label batch is worthy of CSRF
protection, and we don't believe that removing an item from an existing batch
is worthy of CSRF protection, I would argue that we should just make the if for
add be elsif ($op eq 'cud-add' || $op eq 'add') rather than go through all the
gyrations necessary to open a popup and have it immediately and silently POST a
form just to add an item to a newly created batch.


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36192
[Bug 36192] [OMNIBUS] CSRF Protection for Koha
-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to