#28804 [Opn->Asn]: [FIX] lex pattern for ini-file sections wrong (affects php.ini/parse_ini_file())
ID: 28804 Updated by: [EMAIL PROTECTED] Reported By: wendland at scan-plus dot de -Status: Open +Status: Assigned Bug Type:Scripting Engine problem PHP Version: 4CVS, 5CVS Assigned To: zeev New Comment: Zeev, please look into this sometime, or at least add a comment if you're not going to do it? Previous Comments: [2004-07-06 15:55:43] [EMAIL PROTECTED] Assigned to the author. [2004-06-16 14:20:53] wendland at scan-plus dot de Description: The pattern for section in ini-files (as used in php.ini and each file used with parse_ini_file()) is wrong. It looks like (in Zend/zend_ini_scanner.l:140): [[][^[]+[\]][ ]*{NEWLINE}? That means that the following example won't work: [section] var = "val" var2 = "]" var3 = "val3" Try to run this through parse_ini_file(). The pattern should look like: \[[^\]]+\][ ]*{NEWLINE}? If you'd like to disallow brackets in section name, you could use the following pattern: \[[^\]\[]+\][ ]*{NEWLINE}? Kind Regards, Joerg Wendland -- Edit this bug report at http://bugs.php.net/?id=28804&edit=1
#28804 [Opn->Asn]: [FIX] lex pattern for ini-file sections wrong (affects php.ini/parse_ini_file())
ID: 28804 Updated by: [EMAIL PROTECTED] -Summary: lex pattern for ini-file sections wrong (affects php.ini/parse_ini_file()) Reported By: wendland at scan-plus dot de -Status: Open +Status: Assigned Bug Type:Scripting Engine problem -PHP Version: 4.3.7 +PHP Version: 4CVS, 5CVS -Assigned To: +Assigned To: zeev New Comment: Assigned to the author. Previous Comments: [2004-06-16 14:20:53] wendland at scan-plus dot de Description: The pattern for section in ini-files (as used in php.ini and each file used with parse_ini_file()) is wrong. It looks like (in Zend/zend_ini_scanner.l:140): [[][^[]+[\]][ ]*{NEWLINE}? That means that the following example won't work: [section] var = "val" var2 = "]" var3 = "val3" Try to run this through parse_ini_file(). The pattern should look like: \[[^\]]+\][ ]*{NEWLINE}? If you'd like to disallow brackets in section name, you could use the following pattern: \[[^\]\[]+\][ ]*{NEWLINE}? Kind Regards, Joerg Wendland -- Edit this bug report at http://bugs.php.net/?id=28804&edit=1