Re: [PHP-CVS] com php-src: Fixed bug #61922 (ZTS build doesn't accept zend.script_encoding config): NEWS Zend/zend.c

2012-05-04 Thread Dmitry Stogov

Hi Laruence,

Thank you for sending this.

I'm not sure if the patch is completely correct.
With the patch all the threads share the single copy of 
script_encoding_list and when one thread terminates it calls 
compiler_globals_dtor() and frees the script_encoding_list. But other 
threads still keep reference to it.


I think we have to duplicate script_encoding_list for each thread in the 
same way as we do for CG(function_table).


Also I noticed a related issue. At zend.c compiler_globals_dtor() 
CG(script_encoding_list) deallocated using free() and in 
zend_multibyte.c zend_multibyte_set_script_encoding() using efree().


I suppose the second place has to be fixed.

I would appreciate if you could look into the problems.

Thanks. Dmitry.


On 05/03/2012 06:51 PM, Laruence wrote:

Hi, Dmitry:

  you may want to review this,  :)

thanks
On Thu, May 3, 2012 at 10:39 PM, Xinchen Hui  wrote:

Commit:72f19e9a8bcf5712b24fa333a26616eff19ac1ce
Author:Xinchen Hui   Thu, 3 May 2012 22:39:53 
+0800
Parents:   d74d88fbb9c29b1dd5ff05a54b72cf7c9250955c
Branches:  PHP-5.4

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=72f19e9a8bcf5712b24fa333a26616eff19ac1ce

Log:
Fixed bug #61922 (ZTS build doesn't accept zend.script_encoding config)

Bugs:
https://bugs.php.net/61922

Changed paths:
  M  NEWS
  M  Zend/zend.c


Diff:
diff --git a/NEWS b/NEWS
index 8796cf4..9ef6abf 100644
--- a/NEWS
+++ b/NEWS
@@ -10,6 +10,8 @@ PHP   
 NEWS
 (Laruence)

  - Core:
+  . Fixed bug #61922 (ZTS build doesn't accept zend.script_encoding config).
+(Laruence)
   . Fixed missing bound check in iptcparse(). (chris at chiappa.net)
   . Fixed bug #61827 (incorrect \e processing on Windows) (Anatoliy)
   . Fixed bug #61761 ('Overriding' a private static method with a different
diff --git a/Zend/zend.c b/Zend/zend.c
index dd299f1..37a1a27 100644
--- a/Zend/zend.c
+++ b/Zend/zend.c
@@ -781,6 +781,8 @@ void zend_register_standard_ini_entries(TSRMLS_D) /* {{{ */
  void zend_post_startup(TSRMLS_D) /* {{{ */
  {
  #ifdef ZTS
+   zend_encoding **script_encoding_list;
+
zend_compiler_globals *compiler_globals = 
ts_resource(compiler_globals_id);
zend_executor_globals *executor_globals = 
ts_resource(executor_globals_id);

@@ -795,7 +797,12 @@ void zend_post_startup(TSRMLS_D) /* {{{ */
zend_destroy_rsrc_list(&EG(persistent_list) TSRMLS_CC);
free(compiler_globals->function_table);
free(compiler_globals->class_table);
-   compiler_globals_ctor(compiler_globals, tsrm_ls);
+   if ((script_encoding_list = (zend_encoding 
**)compiler_globals->script_encoding_list)) {
+   compiler_globals_ctor(compiler_globals, tsrm_ls);
+   compiler_globals->script_encoding_list = (const zend_encoding 
**)script_encoding_list;
+   } else {
+   compiler_globals_ctor(compiler_globals, tsrm_ls);
+   }
free(EG(zend_constants));
executor_globals_ctor(executor_globals, tsrm_ls);
global_persistent_list =&EG(persistent_list);


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php








--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] com php-src: Bug 61504 updated libmagic.patch: ext/fileinfo/libmagic.patch

2012-05-04 Thread Christopher Jones



On 05/04/2012 03:53 PM, Anatoliy Belsky wrote:


Sean, thanks for reporting that :)

Chris, theoretically there were a possibility to apply the patch for 5.04 which 
was made first (it's attached in #61504) ... but I wouldn't call that quite 
rational. As Sean mentioned, it's already done. For the current patch 5.11 
tests was fixed, some fixes was done over it, and it's released. Besides this, 
patching for 7 versions forwards wasn't that easy, so the longer it's waiting, 
the worst it gets. Therefore I'd really suggest here to document this and to 
make the warnings more meaningful.

Hannes, I agree here even more than you :) . But, that was a security 
conditioned upgrade. The patch for 5.04 has existed shortly before the patch 
5.11, but finally the 5.11 one was considered as better. The notices come 
directly from libmagic, so no wonder some of them are not handled properly (and 
they were not before). The development was concentrated more on the usage with 
the compiled in data (as use of the externals is rare), so I think at the end 
of he day a security fix is worth it.

Thanks for the help guys and regards

Anatoliy


We appreciate your help too.

There are some lessons I've learned from this:

- BC breaks are bad and should be discussed (maybe this one was, but
  that would have been on the security list that I'm not on)

- clear documentation on any BC breakage is needed

- The PHP NEWS updating process is broken.

Chris

--
christopher.jo...@oracle.com
http://twitter.com/#!/ghrd

--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] com php-src: Bug 61504 updated libmagic.patch: ext/fileinfo/libmagic.patch

2012-05-04 Thread Christopher Jones

Hi Anatoliy,

I can't see the NEWS entry in the PHP-5.4 or PHP-5.3 heads:
 http://git.php.net/?p=php-src.git;a=blob_plain;f=NEWS;hb=refs/heads/PHP-5.4
 http://git.php.net/?p=php-src.git;a=blob_plain;f=NEWS;hb=refs/heads/PHP-5.3

I can see it in NEWS from the 5.3.12.tar.bz2 bundle.

This all reinforces that the PHP NEWS updating process is one of my pet peeves.

In any case, the backward compatibility break isn't mentioned - this is the 
critical
thing that should be mentioned to help end users.

Chris

On 05/04/2012 03:57 PM, Anatoliy Belsky wrote:

Chris,

it's already in the news

http://git.php.net/?p=php-src.git;a=blob;f=NEWS;h=d26ffea8ab357a44e37044193c8b316dfaa61662;hb=704bbb3263d0ec9a6b4a767bbc516e55388f4b0e

Regards

Anatoliy

On Fri, 04 May 2012 15:19:31 -0700
Christopher Jones  wrote:




On 05/04/2012 03:10 PM, Sean Coates wrote:

What are the options for reverting this fix (while keeping security)?


Thanks for the help on this, Anatoliy and Chris.

In my opinion, it is too late to revert the new behaviour.



This really should never have gone into .11 in the first place. The damage is 
done; let's not make it worse.



Anatoliy,

Do you recall why bug 61504 isn't in NEWS?  Can you make sure some kind of 
entry in
NEWS mentions the change?

Thanks,

Chris

--
christopher.jo...@oracle.com
http://twitter.com/#!/ghrd





--
christopher.jo...@oracle.com
http://twitter.com/#!/ghrd

--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] com php-src: Bug 61504 updated libmagic.patch: ext/fileinfo/libmagic.patch

2012-05-04 Thread Anatoliy Belsky
Chris,

it's already in the news

http://git.php.net/?p=php-src.git;a=blob;f=NEWS;h=d26ffea8ab357a44e37044193c8b316dfaa61662;hb=704bbb3263d0ec9a6b4a767bbc516e55388f4b0e

Regards

Anatoliy

On Fri, 04 May 2012 15:19:31 -0700
Christopher Jones  wrote:

> 
> 
> On 05/04/2012 03:10 PM, Sean Coates wrote:
> >> What are the options for reverting this fix (while keeping security)?
> >
> > Thanks for the help on this, Anatoliy and Chris.
> >
> > In my opinion, it is too late to revert the new behaviour.
> 
> > This really should never have gone into .11 in the first place. The damage 
> > is done; let's not make it worse.
> 
> 
> Anatoliy,
> 
> Do you recall why bug 61504 isn't in NEWS?  Can you make sure some kind of 
> entry in
> NEWS mentions the change?
> 
> Thanks,
> 
> Chris
> 
> -- 
> christopher.jo...@oracle.com
> http://twitter.com/#!/ghrd


-- 
Anatoliy Belsky 

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] com php-src: Bug 61504 updated libmagic.patch: ext/fileinfo/libmagic.patch

2012-05-04 Thread Anatoliy Belsky

Sean, thanks for reporting that :)

Chris, theoretically there were a possibility to apply the patch for 5.04 which 
was made first (it's attached in #61504) ... but I wouldn't call that quite 
rational. As Sean mentioned, it's already done. For the current patch 5.11 
tests was fixed, some fixes was done over it, and it's released. Besides this, 
patching for 7 versions forwards wasn't that easy, so the longer it's waiting, 
the worst it gets. Therefore I'd really suggest here to document this and to 
make the warnings more meaningful.

Hannes, I agree here even more than you :) . But, that was a security 
conditioned upgrade. The patch for 5.04 has existed shortly before the patch 
5.11, but finally the 5.11 one was considered as better. The notices come 
directly from libmagic, so no wonder some of them are not handled properly (and 
they were not before). The development was concentrated more on the usage with 
the compiled in data (as use of the externals is rare), so I think at the end 
of he day a security fix is worth it.

Thanks for the help guys and regards

Anatoliy

On Fri, 04 May 2012 15:02:21 -0700
Christopher Jones  wrote:

> 
> 
> On 05/04/2012 02:22 PM, Anatoliy Belsky wrote:
> > Hi Chris,
> >
> > that's not documented on the php.net yet.
> >
> > I think shortening that notice is a good idea. Probably it should just
> > stop on the first fail and warn about the incompatibility.
> >
> > Cheers
> >
> > Anatoliy
> >
> 
> Hi Anatoliy,
> 
> What are the options for reverting this fix (while keeping security)?
> 
> Do you have an action item to document it the change?
> (https://edit.php.net/ is a convenient way to update doc)
> 
> Chris
> 
> -- 
> christopher.jo...@oracle.com
> http://twitter.com/#!/ghrd


-- 
Anatoliy Belsky 

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] com php-src: Bug 61504 updated libmagic.patch: ext/fileinfo/libmagic.patch

2012-05-04 Thread Christopher Jones



On 05/04/2012 03:10 PM, Sean Coates wrote:

What are the options for reverting this fix (while keeping security)?


Thanks for the help on this, Anatoliy and Chris.

In my opinion, it is too late to revert the new behaviour.



This really should never have gone into .11 in the first place. The damage is 
done; let's not make it worse.



Anatoliy,

Do you recall why bug 61504 isn't in NEWS?  Can you make sure some kind of 
entry in
NEWS mentions the change?

Thanks,

Chris

--
christopher.jo...@oracle.com
http://twitter.com/#!/ghrd

--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] com php-src: Bug 61504 updated libmagic.patch: ext/fileinfo/libmagic.patch

2012-05-04 Thread Sean Coates
> What are the options for reverting this fix (while keeping security)?


Thanks for the help on this, Anatoliy and Chris.

In my opinion, it is too late to revert the new behaviour.

I currently have this in my codebase:

if (version_compare(PHP_VERSION, '5.3.11') >= 0) {
$magicfile = 'magic_php-gte-5_3_11.mgc';
} else {
$magicfile = 'magic_php-lt-5-3-11.mgc';
}
$magicpath = __DIR__ . "/../../../config/{$magicfile}";
$finfo = new finfo(FILEINFO_MIME_TYPE, $magicpath);

Adding additional ifelse clauses for (e.g.) 5.3.13 and 5.4.2, etc. sounds like 
a nightmare.
The only way I could see this working is if the magic db parser somehow tries 
*both* the old and new methods, and frankly, I don't think it's worth it at 
this point.

This really should never have gone into .11 in the first place. The damage is 
done; let's not make it worse.

S



Re: [PHP-CVS] com php-src: Bug 61504 updated libmagic.patch: ext/fileinfo/libmagic.patch

2012-05-04 Thread Christopher Jones



On 05/04/2012 02:22 PM, Anatoliy Belsky wrote:

Hi Chris,

that's not documented on the php.net yet.

I think shortening that notice is a good idea. Probably it should just
stop on the first fail and warn about the incompatibility.

Cheers

Anatoliy



Hi Anatoliy,

What are the options for reverting this fix (while keeping security)?

Do you have an action item to document it the change?
(https://edit.php.net/ is a convenient way to update doc)

Chris

--
christopher.jo...@oracle.com
http://twitter.com/#!/ghrd

--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] com php-src: Bug 61504 updated libmagic.patch: ext/fileinfo/libmagic.patch

2012-05-04 Thread Anatoliy Belsky
Hi Chris,

that's not documented on the php.net yet.

I think shortening that notice is a good idea. Probably it should just
stop on the first fail and warn about the incompatibility.

Cheers

Anatoliy

Am Fr, 4.05.2012, 21:38 schrieb Christopher Jones:
>
>
>
> On 05/04/2012 11:16 AM, Anatoliy Belsky wrote:
>> Hi Chris,
>>
>> please see my comment in the #61940.
>>
>> Regards
>>
>> Anatoliy
>
> Hi Anatoliy,
>
> Is this documented on php.net?
>
> I agree with Sean that the error messages are useless. Is there anyway PHP
> can
> improve on them?
>
> Thanks for looking at it,
>
> Chris
>
>>
>> Am Fr, 4.05.2012, 19:16 schrieb Christopher Jones:
>>>
>>>
>>> On 03/28/2012 03:06 AM, Anatoliy Belsky wrote:
 Commit:11f04c3524cc86a5c4cdf748a107801116604184
 Author:Anatoliy Belsky   Wed, 28 Mar 2012
 12:06:09 +0200
 Parents:   e7fa402c7ccbff8a6ff8af776192416747db0d77
 Branches:  PHP-5.3 PHP-5.4 master

 Link:
 http://git.php.net/?p=php-src.git;a=commitdiff;h=11f04c3524cc86a5c4cdf748a107801116604184

 Log:
 Bug 61504 updated libmagic.patch

 Bugs:
 https://bugs.php.net/61504

 Changed paths:
 M  ext/fileinfo/libmagic.patch




>>>
>>> Anatoliy, Pierre,
>>>
>>> Can you review https://bugs.php.net/bug.php?id=61940 which claims the
>>> fix
>>> for 61504 broke it.
>>>
>>> Thanks,
>>>
>>> Chris
>>>
>>> --
>>> christopher.jo...@oracle.com
>>> http://twitter.com/#!/ghrd
>>>
>>
>>
>
> --
> christopher.jo...@oracle.com
> http://twitter.com/#!/ghrd
>



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] com php-src: Bug 61504 updated libmagic.patch: ext/fileinfo/libmagic.patch

2012-05-04 Thread Hannes Magnusson
On Fri, May 4, 2012 at 9:38 PM, Christopher Jones
 wrote:
>
>
>
> On 05/04/2012 11:16 AM, Anatoliy Belsky wrote:
>>
>> Hi Chris,
>>
>> please see my comment in the #61940.
>>
>> Regards
>>
>> Anatoliy
>
>
> Hi Anatoliy,
>
> Is this documented on php.net?
>
> I agree with Sean that the error messages are useless. Is there anyway PHP
> can
> improve on them?
>
> Thanks for looking at it,
>
> Chris
>
>
>>
>> Am Fr, 4.05.2012, 19:16 schrieb Christopher Jones:
>>>
>>>
>>>
>>> On 03/28/2012 03:06 AM, Anatoliy Belsky wrote:

 Commit:    11f04c3524cc86a5c4cdf748a107801116604184
 Author:    Anatoliy Belsky           Wed, 28 Mar 2012
 12:06:09 +0200
 Parents:   e7fa402c7ccbff8a6ff8af776192416747db0d77
 Branches:  PHP-5.3 PHP-5.4 master

 Link:

 http://git.php.net/?p=php-src.git;a=commitdiff;h=11f04c3524cc86a5c4cdf748a107801116604184

 Log:
 Bug 61504 updated libmagic.patch

 Bugs:
 https://bugs.php.net/61504

 Changed paths:
    M  ext/fileinfo/libmagic.patch




>>>
>>> Anatoliy, Pierre,
>>>
>>> Can you review https://bugs.php.net/bug.php?id=61940 which claims the fix
>>> for 61504 broke it.
>>>
>>> Thanks,
>>>
>>> Chris
>>>
>>> --
>>> christopher.jo...@oracle.com
>>> http://twitter.com/#!/ghrd
>>>
>>
>>
>
> --
> christopher.jo...@oracle.com
> http://twitter.com/#!/ghrd
>
> --
> PHP CVS Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

I couldn't agree more with Sean here.
A major library update should definitely not be done in a point
release, especially when it isn't BC.
And triggering so many different errors that isn't ignored by
ignore_repeated_errors.. Not cool.

Just because we bundle a library doesn't mean we can ignore everyting else

-Hannes

--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] com php-src: Bug 61504 updated libmagic.patch: ext/fileinfo/libmagic.patch

2012-05-04 Thread Christopher Jones




On 05/04/2012 11:16 AM, Anatoliy Belsky wrote:

Hi Chris,

please see my comment in the #61940.

Regards

Anatoliy


Hi Anatoliy,

Is this documented on php.net?

I agree with Sean that the error messages are useless. Is there anyway PHP can
improve on them?

Thanks for looking at it,

Chris



Am Fr, 4.05.2012, 19:16 schrieb Christopher Jones:



On 03/28/2012 03:06 AM, Anatoliy Belsky wrote:

Commit:11f04c3524cc86a5c4cdf748a107801116604184
Author:Anatoliy Belsky   Wed, 28 Mar 2012
12:06:09 +0200
Parents:   e7fa402c7ccbff8a6ff8af776192416747db0d77
Branches:  PHP-5.3 PHP-5.4 master

Link:
http://git.php.net/?p=php-src.git;a=commitdiff;h=11f04c3524cc86a5c4cdf748a107801116604184

Log:
Bug 61504 updated libmagic.patch

Bugs:
https://bugs.php.net/61504

Changed paths:
M  ext/fileinfo/libmagic.patch






Anatoliy, Pierre,

Can you review https://bugs.php.net/bug.php?id=61940 which claims the fix
for 61504 broke it.

Thanks,

Chris

--
christopher.jo...@oracle.com
http://twitter.com/#!/ghrd






--
christopher.jo...@oracle.com
http://twitter.com/#!/ghrd

--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: Fix for CVE-2012-1823: sapi/cgi/cgi_main.c

2012-05-04 Thread Stanislav Malyshev
Commit:0556103f6a347308351436897b3b632450504dd0
Author:Rasmus Lerdorf  Thu, 3 May 2012 15:51:52 
+0200
Committer: Stanislav Malyshev   Fri, 4 May 2012 11:58:24 -0700
Parents:   f5936cceeb26d6094f0e142fcaed510ba5549c4f
Branches:  PHP-5.4

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=0556103f6a347308351436897b3b632450504dd0

Log:
Fix for CVE-2012-1823

Changed paths:
  M  sapi/cgi/cgi_main.c


Diff:
diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c
index d9c3181..5c1c55e 100644
--- a/sapi/cgi/cgi_main.c
+++ b/sapi/cgi/cgi_main.c
@@ -70,6 +70,7 @@
 #include "php_main.h"
 #include "fopen_wrappers.h"
 #include "ext/standard/php_standard.h"
+#include "ext/standard/url.h"
 
 #ifdef PHP_WIN32
 # include 
@@ -1753,6 +1754,9 @@ int main(int argc, char *argv[])
 #ifndef PHP_WIN32
int status = 0;
 #endif
+   char *query_string;
+   char *decoded_query_string;
+   int skip_getopt = 0;
 
 #if 0 && defined(PHP_DEBUG)
/* IIS is always making things more difficult.  This allows
@@ -1803,7 +1807,16 @@ int main(int argc, char *argv[])
}
}
 
-   while ((c = php_getopt(argc, argv, OPTIONS, &php_optarg, &php_optind, 
0, 2)) != -1) {
+   if(query_string = getenv("QUERY_STRING")) {
+   decoded_query_string = strdup(query_string);
+   php_url_decode(decoded_query_string, 
strlen(decoded_query_string));
+   if(*decoded_query_string == '-' && strchr(decoded_query_string, 
'=') == NULL) {
+   skip_getopt = 1;
+   }
+   free(decoded_query_string);
+   }
+
+   while (!skip_getopt && (c = php_getopt(argc, argv, OPTIONS, 
&php_optarg, &php_optind, 0, 2)) != -1) {
switch (c) {
case 'c':
if (cgi_sapi_module.php_ini_path_override) {


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] com php-src: Bug 61504 updated libmagic.patch: ext/fileinfo/libmagic.patch

2012-05-04 Thread Anatoliy Belsky
Hi Chris,

please see my comment in the #61940.

Regards

Anatoliy

Am Fr, 4.05.2012, 19:16 schrieb Christopher Jones:
>
>
> On 03/28/2012 03:06 AM, Anatoliy Belsky wrote:
>> Commit:11f04c3524cc86a5c4cdf748a107801116604184
>> Author:Anatoliy Belsky  Wed, 28 Mar 2012
>> 12:06:09 +0200
>> Parents:   e7fa402c7ccbff8a6ff8af776192416747db0d77
>> Branches:  PHP-5.3 PHP-5.4 master
>>
>> Link:
>> http://git.php.net/?p=php-src.git;a=commitdiff;h=11f04c3524cc86a5c4cdf748a107801116604184
>>
>> Log:
>> Bug 61504 updated libmagic.patch
>>
>> Bugs:
>> https://bugs.php.net/61504
>>
>> Changed paths:
>>M  ext/fileinfo/libmagic.patch
>>
>>
>>
>>
>
> Anatoliy, Pierre,
>
> Can you review https://bugs.php.net/bug.php?id=61940 which claims the fix
> for 61504 broke it.
>
> Thanks,
>
> Chris
>
> --
> christopher.jo...@oracle.com
> http://twitter.com/#!/ghrd
>



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] com php-src: Bug 61504 updated libmagic.patch: ext/fileinfo/libmagic.patch

2012-05-04 Thread Christopher Jones



On 03/28/2012 03:06 AM, Anatoliy Belsky wrote:

Commit:11f04c3524cc86a5c4cdf748a107801116604184
Author:Anatoliy Belsky  Wed, 28 Mar 2012 12:06:09 
+0200
Parents:   e7fa402c7ccbff8a6ff8af776192416747db0d77
Branches:  PHP-5.3 PHP-5.4 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=11f04c3524cc86a5c4cdf748a107801116604184

Log:
Bug 61504 updated libmagic.patch

Bugs:
https://bugs.php.net/61504

Changed paths:
   M  ext/fileinfo/libmagic.patch






Anatoliy, Pierre,

Can you review https://bugs.php.net/bug.php?id=61940 which claims the fix for 
61504 broke it.

Thanks,

Chris

--
christopher.jo...@oracle.com
http://twitter.com/#!/ghrd

--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: Fix bug #61906 ext\phar\tests\zip\phar_setsignaturealgo2.phpt fails: ext/phar/tests/zip/phar_setsignaturealgo2.phpt

2012-05-04 Thread Anatoliy Belsky
Commit:8a10259642f05b11f5fefa1399605a08957f5e59
Author:Anatoliy Belsky  Fri, 4 May 2012 11:40:49 +0200
Parents:   6c12252790cdd75bd79335013badc657fd78af1a
Branches:  PHP-5.3 PHP-5.4 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=8a10259642f05b11f5fefa1399605a08957f5e59

Log:
Fix bug #61906 ext\phar\tests\zip\phar_setsignaturealgo2.phpt fails

Bugs:
https://bugs.php.net/61906

Changed paths:
  M  ext/phar/tests/zip/phar_setsignaturealgo2.phpt


Diff:
diff --git a/ext/phar/tests/zip/phar_setsignaturealgo2.phpt 
b/ext/phar/tests/zip/phar_setsignaturealgo2.phpt
index 372f7dd..7d3730c 100644
--- a/ext/phar/tests/zip/phar_setsignaturealgo2.phpt
+++ b/ext/phar/tests/zip/phar_setsignaturealgo2.phpt
@@ -49,8 +49,10 @@ var_dump($p->getSignature());
 echo $e->getMessage();
 }
 try {
-$keys=openssl_pkey_new();
-openssl_pkey_export($keys, $privkey);
+$config = dirname(__FILE__) . '/../files/openssl.cnf';
+$config_arg = array('config' => $config);
+$keys=openssl_pkey_new($config_arg);
+openssl_pkey_export($keys, $privkey, NULL, $config_arg);
 $pubkey=openssl_pkey_get_details($keys);
 $p->setSignatureAlgorithm(Phar::OPENSSL, $privkey);


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: Fix bug #61904 ext\phar\tests\tar\phar_setsignaturealgo2.phpt: ext/phar/tests/tar/phar_setsignaturealgo2.phpt

2012-05-04 Thread Anatoliy Belsky
Commit:6c12252790cdd75bd79335013badc657fd78af1a
Author:Anatoliy Belsky  Fri, 4 May 2012 11:29:49 +0200
Parents:   0956c00af999c295c5a13644ec835da8f96ad48d
Branches:  PHP-5.3 PHP-5.4 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=6c12252790cdd75bd79335013badc657fd78af1a

Log:
Fix bug #61904 ext\phar\tests\tar\phar_setsignaturealgo2.phpt

Bugs:
https://bugs.php.net/61904

Changed paths:
  M  ext/phar/tests/tar/phar_setsignaturealgo2.phpt


Diff:
diff --git a/ext/phar/tests/tar/phar_setsignaturealgo2.phpt 
b/ext/phar/tests/tar/phar_setsignaturealgo2.phpt
index 422ca90..c16e752 100644
--- a/ext/phar/tests/tar/phar_setsignaturealgo2.phpt
+++ b/ext/phar/tests/tar/phar_setsignaturealgo2.phpt
@@ -32,9 +32,11 @@ var_dump($p->getSignature());
 echo $e->getMessage();
 }
 try {
+$config = dirname(__FILE__) . '/../files/openssl.cnf';
+$config_arg = array('config' => $config);
 $private = openssl_get_privatekey(file_get_contents(dirname(dirname(__FILE__)) 
. '/files/private.pem'));
 $pkey = '';
-openssl_pkey_export($private, $pkey);
+openssl_pkey_export($private, $pkey, NULL, $config_arg);
 $p->setSignatureAlgorithm(Phar::OPENSSL, $pkey);
 var_dump($p->getSignature());
 } catch (Exception $e) {


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php