php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #68941 mod_files.sh is a bash-script
Submitted: 2015-01-28 23:15 UTC Modified: 2015-01-29 09:38 UTC
From: bugzilla at ii dot nl Assigned: yohgaki
Status: Closed Package: Session related
PHP Version: Irrelevant OS: linux
Private report: No CVE-ID:
 [2015-01-28 23:15 UTC] bugzilla at ii dot nl
Description:
------------
The script references in the session.save-path documentation, mod_files.sh, found at https://github.com/php/php-src/blob/master/ext/session/mod_files.sh
says #!/bin/sh at the top (and in the middle), but it uses [[ extensively which is a bashism.

If your default shell isn't bash but dash, you end up with an quite deep subdirectory (0/0/0/0/0/.....) because the recursion won't stop.

Fix is quite easy: change #!/bin/sh (and the call for sh later on) to #!/bin/bash.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-01-29 00:33 UTC] yohgaki@php.net
Automatic comment on behalf of yohgaki
Revision: http://git.php.net/?p=php-src.git;a=commit;h=abf9e2ea09e8776f411e7133cd5b838682260e4d
Log: Fixed Bug #68941 mod_files.sh is a bash-script
 [2015-01-29 00:33 UTC] yohgaki@php.net
-Status: Open +Status: Closed
 [2015-01-29 09:07 UTC] bugzilla at ii dot nl
Fix is incomplete, you forgot the 'sh' call at the bottom (I fell for this at first too)
 [2015-01-29 09:29 UTC] bugzilla at ii dot nl
-Status: Closed +Status: Assigned
 [2015-01-29 09:29 UTC] bugzilla at ii dot nl
Apologies if you read my comment already, got no feedback from the UI to whom my comment got sent so I reopened.
 [2015-01-29 09:38 UTC] yohgaki@php.net
-Status: Assigned +Status: Closed -Assigned To: +Assigned To: yohgaki
 
PHP Copyright © 2001-2017 The PHP Group
All rights reserved.
Last updated: Mon Apr 24 07:01:38 2017 UTC