php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #17390 dump_file doesn't work if path is not absolute
Submitted: 2002-05-23 11:02 UTC Modified: 2002-10-28 11:01 UTC
Votes:1
Avg. Score:4.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (100.0%)
From: sysadmin at alexdupre dot com Assigned:
Status: Not a bug Package: DOM XML related
PHP Version: 4.0CVS-2002-05-23 OS: FreeBSD and Windows 2000
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: sysadmin at alexdupre dot com
New email:
PHP Version: OS:

 

 [2002-05-23 11:02 UTC] sysadmin at alexdupre dot com
I think to have found a bug in the dump_file() function of the domxml extension. If the path passed to the function is relative, the file is not saved anywhere (first issue) and the function returns anyway the number of bytes written (second issue).
From the sources it seems that dump_file simply calls xmlSaveFile from libxml2, so maybe a path check should be done before the call.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-06-04 14:42 UTC] rrichards at digarc dot com
what version of libxml2 are you running? there was a bug in it which would causes this error and has been fixed since 2.2.12.
 [2002-06-04 14:56 UTC] sysadmin at alexdupre dot com
2.4.20 on FreeBSD, 2.4.9 on Windows.
 [2002-06-05 12:40 UTC] rrichards at digarc dot com
this is a possible apache2 problem (BSD running apache2). when run with apache 1.3 it works correctly. unable to test with apache 2 now to confirm. the windows issue was due to the libxml version. once upgraded it works fine.
 [2002-09-14 07:16 UTC] rrichards at digarc dot com
This is still a problem running under windows with any version of apache (though different behavior than Apache2 on FreeBSD at least). see bug 17779 for more information as they are related. This specific bug can be fixed if the file path, being passed or when domxml is writing to a file, is converted to the full path before being sent to the libxml2 function calls.

I have a patch for this specific bug, but not sure about adding it as the DTD issue (bug 17779) would still remain which would result in an inconsistant implementation of file directory handling. (passing in filesnames as parameters would work, but DTD references in the xml would not unless they were full path names).
 [2002-10-09 14:31 UTC] iliaa@php.net
domxml, not Apache 2 issue. Possibly a duplicate of bug #17779.
 [2002-10-28 11:01 UTC] sterling@php.net
domxml, operating system, user issue - not a php issue.
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Wed Nov 13 14:01:29 2019 UTC