[koha-commits] main Koha release repository branch 3.14.x updated. v3.14.02-18-gac5a13e

Git repo owner gitmaster at git.koha-community.org
Mon Jan 27 14:10:43 CET 2014


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "main Koha release repository".

The branch, 3.14.x has been updated
       via  ac5a13eaa34b2377d39b362ed0326f200b5365e5 (commit)
      from  9c4dd152956022c2ec391550c39aa9e97a87d58f (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit ac5a13eaa34b2377d39b362ed0326f200b5365e5
Author: Magnus Enger <magnus at enger.priv.no>
Date:   Sat Nov 23 22:57:03 2013 +0100

    Bug 11188 - Make gather_print_notices.pl die on failed open()
    
    Problem:
    If you tell gather_print_notices.pl to write output to a location
    you do not have write access to, it will silently fail to write the
    data, but still mark unsent messages as sent.
    
    Solution:
    This patch adds two lines of defense:
    1. Check that the location given for the output is writable
    2. use "open() or die" instead of just "open()" when writing the
       output
    The first measure should catch most of the potential errors, but
    I guess a directory can be writable, but the open() still can fail
    because the disk is full or something similar.
    
    To test:
    - Make sure you have some unsent messages in the message_queue table,
      that do not have an email adress
    - Apply the patch
    - Run the script, pointing at a location you do not have access to
      write to. Check that the script exits with an appropriate error
      message, and that the unsent messages are still unsent. Do this
      both with and without the -s option.
    - To fake passing the first line of defence, comment out line 62
      and put this in instead:
      if ( !$output_directory || !-d $output_directory ) {
    - Run the script again as above, check you get an appropriate
      error and that the message queue is not touched
    - Reset line 62 to how it was
    - Run the script against a directory you do have access to write to
      and check that output is produced as expected and that messages
      are marked as sent
    - Sign off
    
    Signed-off-by: Chris Cormack <chris at bigballofwax.co.nz>
    Signed-off-by: Katrin Fischer <Katrin.Fischer.83 at web.de>
    Passes all tests and QA script.
    Works as described.
    
    Signed-off-by: Galen Charlton <gmc at esilibrary.com>
    (cherry picked from commit e8a24c35f64cb461a80f768b505bbf16c49dfeff)
    Signed-off-by: Fridolin Somers <fridolin.somers at biblibre.com>

-----------------------------------------------------------------------

Summary of changes:
 misc/cronjobs/gather_print_notices.pl |   15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)


hooks/post-receive
-- 
main Koha release repository


More information about the koha-commits mailing list