From dff3556d5c6ae8985458e0b7c305c98942df1750 Mon Sep 17 00:00:00 2001 From: Markus Birth Date: Mon, 16 Aug 2021 23:25:22 +0200 Subject: [PATCH] Add support for KeepassXC's multiple URL matching. --- convert.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/convert.py b/convert.py index 998a24e..c211993 100755 --- a/convert.py +++ b/convert.py @@ -180,9 +180,17 @@ for line in data: if "location" in item: entry.url = item["location"] if "URLs" in secure: + kp2idx = 0 for u in secure["URLs"]: if not entry.url: entry.url = u["url"] + else: + # https://github.com/keepassxreboot/keepassxc/pull/3558 + prop_name = "KP2A_URL" + if kp2idx > 0: + prop_name += "_{}".format(kp2idx) + entry.set_custom_property(prop_name, u["url"]) + kp2idx += 1 url = urlparse(u["url"]) settings["Allow"].append(url.hostname) applySettings = True