php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #59534 RarEntry::extract() not accepting password
Submitted: 2010-12-08 11:01 UTC Modified: 2010-12-08 14:38 UTC
From: rogier at dsone dot nl Assigned:
Status: Closed Package: rar (PECL)
PHP Version: 5.3.1 OS: Windows
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: rogier at dsone dot nl
New email:
PHP Version: OS:

 

 [2010-12-08 11:01 UTC] rogier at dsone dot nl
Description:
------------
The extract() method of the RarEntry class does not to accept the password (3rd) argument, though the method seems to have it whenever I reflect the class.

I do know I can also provide the password using the RarArchive::open() method, but that is not relevant to this bug imho.

Take note: the protected test archive just contains a file 'txt.txt' having random textual content

Reproduce code:
---------------
$rc = new ReflectionClass('RarEntry');
$i=0;
foreach ($rc->getMethod('extract')->getParameters() as $p) echo "prm#".($i++)." {$p->name}\n";

$arc = RarArchive::open('protarch.rar');
$ok=$arc->getEntry('txt.txt')->extract(false,'C:\\tmp\\pwd_txt.txt', 'pass');
if ($ok) echo 'EXTRACTED';

Expected result:
----------------
prm#0 path
prm#1 filename
prm#2 password
EXTRACTED

Actual result:
--------------
prm#0 path
prm#1 filename
prm#2 password
PHP Warning:  RarEntry::extract() expects at most 2 parameters, 3 given in xxxx.php on line xxxx

Warning: RarEntry::extract() expects at most 2 parameters, 3 given in in xxxx.php on line xxxx

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-12-08 14:38 UTC] cataphract@php.net
This was already fixed in revision #299004 http://svn.php.net/viewvc?view=revision&revision=299004

You can use trunk until the next release.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 14:01:29 2024 UTC