Repository navigation
Releases
1.2.3: se7enxweb/expcomponents-webdav, Exponential's fork of Zeta Components Webdav
se7enxweb/expcomponents-webdav 1.2.3 is Exponential's fork of Zeta Components Webdav (zetacomponents/webdav), maintained by 7x and the Exponential Foundation under the Apache License 2.0. It replaces zetacomponents/webdav; the class names (ezc*) and the API are unchanged.
Install: composer require se7enxweb/expcomponents-webdav:~1.2.3
Changes
- Updated: Requirements on other Zeta Components point to their Exponential
forks (se7enxweb/expcomponents-base), which replace the upstream packages. - Updated: composer.json states the license (Apache-2.0) and the PHP
versions; the component is tested on PHP 7.4 to 8.5. - Added: NOTICE keeps the upstream copyright notices and names the fork;
README.md describes the fork. - Added: A GitHub Actions workflow running the test suite on PHP 7.4 to 8.5.
- Fixed: Digest authentication works again on PHP 7 and later. The
Authorization header parser assigned $res->$matchSet[1], which PHP 7 reads
as ($res->$matchSet)[1] ("Array to string conversion"), so username,
realm, nonce, uri, response, algorithm and opaque were never set. - Fixed: A MOVE that replaces an existing destination, or whose source cannot
be removed, failed on PHP 8 with a TypeError: the simple backend counted
the result of performDelete(), which is a multistatus response or null. It
returns that response, as DELETE does (PHP 7 wrapped it in a second
multistatus response). - Fixed: The memory backend's forced copy errors created their error
responses without "new", a fatal error. - Fixed: A dead property whose prefix is bound to no namespace
(xmlns:p="", which XML namespaces do not allow) was written back as
<p:name/> without a declaration with libxml 2.9, which is not
namespace-well-formed. Such a property is stored and written without the
prefix, as older libxml versions did. - Fixed: On PHP 8.2 and later, an ezcWebdavDateTime serialized by an earlier
PHP version could not be unserialized ("Invalid serialization data for
DateTime object"): DateTime::__unserialize() replaced the class's
__wakeup(). The class has its own __serialize() and __unserialize(), which
keep its format and read every earlier one. - Fixed: PHP 8.5 wrote the XML declaration as encoding="utf-8", earlier
versions as encoding="UTF-8". The XML tool names the encoding UTF-8, so
every PHP version writes the same responses. - Updated: The tests run on PHPUnit 9 (PHP 7.4 to 8.5).
1.2.2: Security fixes, published as se7enxweb/expcomponents-webdav
Security release. The package is now published as se7enxweb/expcomponents-webdav.
Security fixes
From zetacomponents/Webdav pull request zetacomponents#8, contributed by Ekkehard Doerre (CJW Network):
- Paths can no longer leave the root of
ezcWebdavFileBackend. Both path factories remove.and..segments (RFC 3986, section 5.2.4), also from theDestinationheader of COPY and MOVE; the file backend refuses request URIs and destinations that still contain such segments, also percent-encoded, with 403 Forbidden. - Request bodies with a document type declaration are refused with 400 Bad Request and are parsed with
LIBXML_NONET; the libxml error handling state is restored on errors. - Digest authentication compares the digest in constant time and sends a nonce from
random_bytes().
From pull request zetacomponents#6:
- Lock tokens are created from
random_bytes()as UUID version 4 instead of a time-based value.
From pull request zetacomponents#7:
ezcWebdavFileBackendchecks the real path (realpath()) of every resource it reads, writes, lists, copies or deletes. A symbolic link inside the root that points outside of it, or a symbolic link whose target does not exist, is no longer followed: requests through it are refused with 403 Forbidden, listings leave it out, a recursive COPY skips it and a recursive DELETE is refused. Symbolic links that stay inside the root keep working.
Tests cover all of these fixes; the rest of the suite is unchanged against 1.2.1.
Package name
- Renamed: the Composer package is
se7enxweb/expcomponents-webdav(repository github.com/se7enxweb/expcomponents-webdav). Itreplacesse7enxweb/zetacomponents-webdavandzetacomponents/webdav, so existing requirements keep resolving. Class names (ezcWebdav*) are unchanged. se7enxweb/zetacomponents-webdavis abandoned in favour of this package; update yourcomposer.jsonto"se7enxweb/expcomponents-webdav": "~1.2.2".
Full list in the ChangeLog.
1.2.1: WebDAV on PHP 8, as se7enxweb/zetacomponents-webdav
Updated:
- PROPFIND, LOCK and property output work on PHP 8: the lock plugin counted a null 404 list (a TypeError on PHP 8.0 and later whenever every requested property was found).
- LOCK of a missing resource no longer recurses; property values escape "&" once; an empty PROPFIND body asks for all properties; locks show in PROPFIND.
- The component runs on PHP 8.1 to 8.5 without deprecation notices.
- Published as se7enxweb/zetacomponents-webdav, replacing zetacomponents/webdav.
Added:
- Regression tests for the lock plugin, property escaping and the output.
Verified with the Exponential WebDAV backend on PHP 8.5 and 8.1: PROPFIND with and without a body, PUT, GET, LOCK (and 423 without the token), LOCK refresh, UNLOCK, DELETE, names with spaces.