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
## 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)
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 main2026-05-14 17:47:00 +01:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
parsePropfindImageHrefsregex used[a-z]+:to match XML namespace prefixes, which excluded numeric prefixes likens0:emitted by Python'sxml.etree.ElementTree(used by WsgiDAV and some server configurations)[a-z][a-z0-9]*:— starts with a letter, optionally followed by letters or digitsns0:multistatusfixtureRelated