fix(writer-pipeline): handle ns0: XML namespace prefix in WebDAV PROPFIND parser (BIT-22306) #13

Merged
spark merged 1 commits from fix/BIT-22306-webdav-ns-prefix into main 2026-05-14 17:47:00 +01:00
Owner

Summary

  • Bug: parsePropfindImageHrefs regex used [a-z]+: to match XML namespace prefixes, which excluded numeric prefixes like ns0: emitted by Python's xml.etree.ElementTree (used by WsgiDAV and some server configurations)
  • Fix: Changed all three patterns to [a-z][a-z0-9]*: — starts with a letter, optionally followed by letters or digits
  • Test added: regression test with a real WsgiDAV ns0:multistatus fixture

Related

## Summary - **Bug:** `parsePropfindImageHrefs` regex used `[a-z]+:` to match XML namespace prefixes, which excluded numeric prefixes like `ns0:` emitted by Python's `xml.etree.ElementTree` (used by WsgiDAV and some server configurations) - **Fix:** Changed all three patterns to `[a-z][a-z0-9]*:` — starts with a letter, optionally followed by letters or digits - **Test added:** regression test with a real WsgiDAV `ns0:multistatus` fixture ## Related - Smoke test: [BIT-22306](/BIT/issues/BIT-22306) - Parent: [BIT-22292](/BIT/issues/BIT-22292)
spark added 1 commit 2026-05-14 17:34:19 +01:00
fix(writer-pipeline): handle ns0: XML namespace prefix in WebDAV PROPFIND parser (BIT-22306)
Tests / writer-pipeline tests (push) Successful in 14s
Tests / bridge tests (push) Successful in 14s
Tests / frontend lib tests (push) Successful in 15s
Tests / writer-pipeline tests (pull_request) Successful in 11s
Tests / bridge tests (pull_request) Successful in 12s
Tests / frontend lib tests (pull_request) Successful in 13s
738c1a56d0
Python's xml.etree.ElementTree auto-assigns numeric prefixes like ns0: for
the first namespace it encounters. The PROPFIND regex [a-z]+: did not match
ns0: because of the digit, causing parsePropfindImageHrefs to return empty
on any WebDAV server backed by Python (WsgiDAV, some NextCloud configs).

Change [a-z]+: → [a-z][a-z0-9]*: in all three namespace-tagged element
patterns (response, href, getlastmodified). Test added with a real WsgiDAV
multistatus fixture.

Paperclip-Issue: BIT-22306
spark merged commit 369e0b27c2 into main 2026-05-14 17:47:00 +01:00
Sign in to join this conversation.