Skip to content
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

Allow multiple URL's for a single password entry #45

Closed
VinnieNZ opened this issue Feb 13, 2020 · 4 comments
Closed

Allow multiple URL's for a single password entry #45

VinnieNZ opened this issue Feb 13, 2020 · 4 comments

Comments

@VinnieNZ
Copy link

Feature Request.

Would it be possible to implement extra URL's to be handled for a single password entry, probably via the "String Fields" page, similar to how KPH string entries work for additional password fields?

Something like KPURL and then the string value can be the URL.

It could hopefully then allow for regex matched URL's to be added as well.

Use case example:

HP have numerous login pages between Learner ID, channel services, partner portal, unison, passport, expert one, etc... And I've got separate entries (using references) for all these currently, as they all seem to want different URL's for credential entry.

Would be nice to tidy all that up.

Regex use case is that there is no wildcard support, which is troublesome when using the more exact URL detection - particularly when companies tend to do odd things like:
www.website.com
ww1.website.com
ww2.website.com
www.website.net

It'd be good to be able to have the URL field as https://www.website.com and then the ability to capture the variations using regex.

@smorks
Copy link
Owner

smorks commented Feb 13, 2020

I've actually been wondering lately if the plugin already does that, which it doesn't. And yes it is a good idea, I'll look at implementing it when I have some free time.

smorks added a commit that referenced this issue Feb 19, 2020
still need to add regex support
@smorks smorks closed this as completed Feb 22, 2020
@seanf
Copy link

seanf commented Feb 27, 2020

@smorks Thanks for implementing this!

Reading the code, it seems that "URL regex" fields can only contain patterns for hostnames, not the complete URL. Is that right?

With v2.0.9, I can get the extra URL fields to work, but I just can't work out the regex support. I have a field called "URL regex", but it only seems to work for basic string matching. As soon as I add regex characters (eg escaping dot as \.) I get nothing.

Can you please give some examples of patterns?

eg for @VinnieNZ's example:

www.website.com
ww1.website.com
ww2.website.com
www.website.net

I would have tried this pattern:

^ww[w12]\.website\.(com|net)$

But I seem to be missing something.

@smorks
Copy link
Owner

smorks commented Feb 27, 2020

i believe i know why regex isn't working. basically, it works by first searching all the entries (using a built-in search funtion in keepass) for the host.

if the regex you have is in a string field, and there is no other url's in your entry, then it will never return anything in that first search (because it doesn't find (website.com or website.net anywhere), therefore nothing will be returned.

i'll have to think about another way to get that to work.

i could possibly scrap the built-in search and just check each entry, but i'm not sure how efficient that will be. i'll create a new issue for this.

@seanf
Copy link

seanf commented Jul 4, 2020

Thanks for the explanation @smorks. I'll follow #46

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants