-
-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PasswordExporter is cleaning paths without respecting cmdclean #172
Comments
The solution is easier that your think: the So adding a new option like |
I follow 100%, it would also be useful then over in kdbx.py
This would cover multi-login needs in multiple ways to avoid false-positives:
We could use the new feature flag ( |
You are right playing around |
Cleaning up/closing this issue as it's a mistaken bug report but not a bug. |
I don't quite know why this is happening, spent awhile in the pdb debugger and am still scratching my head for the proper fix. I'm not a programmer by trade so kinda hit a wall on this one getting towards what the real fix is, but I can hack it to work.
Problem: I do not want
dpaths()
orduplicate()
to activate; I am converting a Bitwarden to KeepassXC database which is a flat Root (no groups at all for Logins); the source and destination fully support entries in the Root which have the same title. However, the PasswordExporter use ofdpaths()
is triggering a clean to activate somehow, andduplicate()
is just missing the code to respect the flag at all.manager.py ->
PasswordExporter.clean()
this logic is fine and works as expected:However, as soon as we get to the next 3 it starts breaking:
Step 1: changes the
path
element when there are matching double-entries when i don't want it toStep 2: makes it even worse by taking the step (1) items and double-nesting them
Step 3: just ignores my wishes (does not respect
cmdclean = False
)Before we get to step 1, I might have 2 entries for github.com that I want in the Root (no group) with different login names; I do not want these "cleaned" into groups (paths) at all, just add two entries to my Root (fully supported by the KDBX format):
After step 1
dpaths()
I get grouped paths:After step 2
dpaths()
I get grouped subpaths:If I "fix" step 1 and/or 2 to stop this behaviour (it's as easy as commenting out those two lines of code), then step 3
duplicate()
creates the-x
index to the title when i don't want it:What I've done that shows how to fix it is the most basic python in the world - if
cmdclean
is not set, return and skip the methods.manager.py change:
clean.py changes:
I'm sure there's a more correct way to fix this, however this hack works to give me the expected result. I realize that I have to use the
--force
CLI param to getkdbx.py:insert()
to stop complaining about duplicate entries (which in this case is correct, because I'm converting a database into a fresh, empty KDBX file and each duplicate is actually unique in the username field, it's just the same title).The text was updated successfully, but these errors were encountered: