php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #57701 svn_ls calling generates Assertion is_canonical failure
Submitted: 2007-06-13 05:10 UTC Modified: 2007-06-13 05:18 UTC
From: ciprian dot amariei at gmail dot com Assigned:
Status: Closed Package: svn (PECL)
PHP Version: 5.2.1 OS: Ubuntu Fiesty
Private report: No CVE-ID: None
 [2007-06-13 05:10 UTC] ciprian dot amariei at gmail dot com
Description:
------------
svn_ls does not return anything and generates an error for some servers.



Reproduce code:
---------------
$ar = svn_ls("http://drf.googlecode.com/svn/trunk/",-1);

Expected result:
----------------
array with ls content

Actual result:
--------------
apache2: /build/buildd/subversion-1.4.3dfsg1/subversion/libsvn_subr/path.c:343: svn_path_remove_component: Assertion `is_canonical(path->data, path->len)' failed.
[Wed Jun 13 04:57:56 2007] [notice] child pid 7410 exit signal Aborted (6)

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-06-13 05:18 UTC] ciprian dot amariei at gmail dot com
done some more research on this and it turns out to be a stupid problem that comes from subversion libraries:

from path.c:
#ifndef NDEBUG
static svn_boolean_t
is_canonical (const char *path,
               apr_size_t len)
{
   return (! SVN_PATH_IS_PLATFORM_EMPTY (path, len)
           && (len <= 1 || path[len-1] != '/'));
}
#endif

The problem was the trailing slash. ;) Now it works just fine.
reference: http://svn.haxx.se/users/archive-2005-09/0602.shtml
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 08:01:28 2024 UTC