https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38810 Bug ID: 38810 Summary: SIP account level system preference overrides not properly cleared between requests Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: SIP2 Assignee: koha-bugs@lists.koha-community.org Reporter: kyle@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org Account level syspref overrides in SIP will "leak" between SIP requests. Basically an account level system preference override will may be set by a given request, but those overrides will never be cleared for the life of that SIP process thus "contaminating" that process until it reaches end of life". This is because the code # Clear overrides from previous message handling first foreach my $key ( keys %ENV ) { delete $ENV{$key} if index($key, 'OVERRIDE_SYSPREF_') > 0; } is checking if the env key contains the substring OVERRIDE_SYSPREF_ at an index greater than 0. The problem is that for all overrides the subtring *starts at 0* since it's always the first part of the string. If the substring is not part of the string index will return -1. TLDR we have an "off by one" error. We need to check that the return value is non-negative instead of positive. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.