Re: Re: ini-parsing, double quotes, windows in 5.3

From: Date: Fri, 05 Sep 2008 08:19:30 +0000
Subject: Re: Re: ini-parsing, double quotes, windows in 5.3
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-40281@lists.php.net to get a copy of this message
Hannes Magnusson wrote:
On Thu, Sep 4, 2008 at 22:43, Jani Taskinen <jani.taskinen@sci.fi> wrote:
Johannes Schlüter kirjoitti:
Hi, now that we have a publicly available alpha on Windows we get the first feedback from Windows users. Within quite short time we got two bug reports (#45992 #45994) about a change in the ini-parsing: With <=5.2 we allow include_path = "c:\foo\bar\"
That SHOULD cause a syntax error of course. If it doesn't, it's the bug to fix. Allowing \" was a bug that was fixed to begin with. If that causes a syntax error, it's quite easy to catch and fix by people upgrading to 5.3..
php.ini-recommended, 5.3: ;;;;;;;;;;;;;;;;;;;;;;;;; ; Paths and Directories ; ;;;;;;;;;;;;;;;;;;;;;;;;; ; UNIX: "/path1:/path2" ;include_path = ".:/php/includes" ; ; Windows: "\path1;\path2" ;include_path = ".;c:\php\includes" As you can see, Windows users are explicitly told to use foo\bar\ inside double quotes. This has been like this for years and is also documented in the manual. It looks to me that the old behavior was very intentional, logical or not.
Ini files are not documentation. And as / works also for winblows, that should be used JUST for the sake of consistency anyway.. Anyway, the fix is quite easy: Only allow \" and no other escapes. And doing "foo\" should cause a syntax error. --Jani

« previous php.internals (#40281) next »