http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10033

Kyle M Hall <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #17402|0                           |1
        is obsolete|                            |

--- Comment #3 from Kyle M Hall <[email protected]> ---
Created attachment 17541
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=17541&action=edit
Bug 10033 - dangerous query in _koha_modify_item

The SQL query build in C4::Items::_koha_modify_item performs an update on a row
of items table identified by itemnumber.
Actually the query is build using a hash of datas :
    for my $key ( keys %$item ) {
        $query.="$key=?,";
        push @bind, $item->{$key};
    }
But this hash contains 'itemnumber' key, so you get an update including the
primary key.
It is actually harmless but may be dangerous.

This patch simply skips itemnumber key in above loop.

Test plan :
Check you can create and modify items.

Signed-off-by: Kyle M Hall <[email protected]>

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
http://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