[Tickets #12557] Re: File based SessionHandler: Fix unlikely data corruption due to file creation race

noreply at bugs.horde.org noreply at bugs.horde.org
Mon Aug 12 21:17:14 UTC 2013


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: http://bugs.horde.org/ticket/12557
------------------------------------------------------------------------------
  Ticket             | 12557
  Updated By         | Git Commit <commits at lists.horde.org>
  Summary            | File based SessionHandler: Fix unlikely data corruption
                     | due  to file creation race
  Queue              | Horde Framework Packages
  Version            | Git master
  Type               | Bug
  State              | Unconfirmed
  Priority           | 1. Low
  Milestone          |
  Patch              | 1
  Owners             |
------------------------------------------------------------------------------


Git Commit <commits at lists.horde.org> (2013-08-12 21:17) wrote:

Changes have been made in Git (master):

commit 18ef62d7ac1a5397803137e2d1887850a80b33bf
Author: Thomas Jarosch <thomas.jarosch at intra2net.com>
Date:   Sat Aug 10 13:52:42 2013 +0200

     File based SessionHandler: Fix unlikely data corruption due to  
file creation race

     There is a small time window between is_readable() returns true
     and another process creates the file at the same time.
        -> we would truncate the data of the other process.

     Fix it by using 'c+' fopen() mode which is available since PHP 5.2.6.
     (Minimum PHP version for Horde is 5.3.0)

     For those interested in the details of the PHP open modes, look for the
         PHPAPI int php_stream_parse_fopen_modes(const char *mode, int  
*open_flags)
     function in the PHP source code.

     Signed-off-by: Michael M Slusarz <slusarz at horde.org>

     Bug #12557

  .../lib/Horde/SessionHandler/Storage/File.php      |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)

http://git.horde.org/horde-git/-/commit/18ef62d7ac1a5397803137e2d1887850a80b33bf





More information about the bugs mailing list