#1732 Multiple URL Field per entry in Keepass 2.x

KeePass
open
nobody
None
5
2014-08-06
2013-05-08
ThierryP
No

Having multiple URL fields per entry would let us make some consolidation in database.

For example, if I have a Linux based host that I can access with Putty and WinSCP, I can have just one entry, with username and password, with one URL for Putty and one for WinSCP.

It also makes easier the creation of entry's templates : one for Linux boxes (with Putty, WinSCP Urls), one for Windows boxes (with TS Url), etc.
You just have to duplicate it, and modify title, username, password and hostname custom string.

We can imagine that :
- "Custom" URL fields could be all String fields whose name begin with "URL_" (see attachment FR_MultipleURLperEntry/KP-CustomUrl-1.png).
- A sub menu "Open Custom URL" would let me open these "custom" URLs (see attachment FR_MultipleURLperEntry/KP-CustomUrl-2.png).

If possible, I can post a patch for this feature.

Thanks by advance,

Best regards,

Thierry

1 Attachments

Discussion

  • Paul
    Paul
    2013-05-10

    It may be easier to check the field contents and if it begins with any of the known URL handlers, provide a run menu/double click. Then it doesn't matter what the filed is called.
    I would exclude any fields that are protected from this check.

    cheers, Paul

     
  • ThierryP
    ThierryP
    2013-05-10

    Hi Paul,

    Thanks for your answer.

    It's effectively easier.
    In that way, can I assume that "begins with any of the known URL" means that the value begins by "cmd://" or any scheme that has UrlOverride configured ?

    As we are using the field's value to decide if it's an Url, should we compile it before or not ?

    Best regards,

    Thierry

     
  • Paul
    Paul
    2013-05-11

    Thierry,

    I'd use anything in class AceUrlSchemeOverrides as a known URL.

    To allow for changes to overrides I'd check the field contents when the record is selected.

    cheers, Paul

     
  • Paul
    Paul
    2013-05-11

    The URL check has been implemented in the KeePass Enhanced Entry View plug-in. May be worth a look.

    cheers, Paul

     
  • ThierryP
    ThierryP
    2013-05-12

    Hi Paul,

    My first way to decide if a field value is an URL was to use a combination of :
    - WinUtil.IsCommandLineUrl.
    - an overloaded UrlSchemeOverrides.GetOverrideForUrl, which allowed me to get any override scheme even if it was not enabled (like http/https).
    It worked fine but I was not able to match scheme like ftp, as it was not defined as override.

    Looking to KeePass Enhanced Entry View plug-in's code, I saw that it was using a completly different way, with a call to System.Uri.TryCreate.
    It solves my problem for FTP URLs, but has a few issues to me :
    - Keepass specific cmd:// URLs may contain non-RFC 3986 compliant characters, like space. So they may not match.
    - Keepass allows non-RFC 3986 compliant characters in override schemes, like "_". So they may not match.

    So I suggest you using a combination of both ways to decide if a field value is an URL :
    - WinUtil.IsCommandLineUrl for cmd:// URLs.
    - UrlSchemeOverrides.GetOverrideForUrl (not overloaded) for enabled override schemes (like custom one's).
    - A call to System.Uri.TryCreate for classic URLs (like ftp, telnet, ssh, etc.).
    This way, all kinds of URLs are matched correctly.
    Is this OK for you ?

    Concerning the User Interface, should a dedicated menu (like the one in attachments of my first post) be OK ?

    Best regards,

    Thierry

     
    Last edit: ThierryP 2013-05-12
  • Paul
    Paul
    2013-05-13

    A dedicated menu for additional URL fields isn't necessary as KeePass already makes it possible to click on these fields in the entry view pane, except cmd:// entries.
    Using the Enhanced Entry View plug-in makes it easier again.

    cheers, Paul

     
  • ThierryP
    ThierryP
    2013-05-13

    When oftently using multiple entries, navigating between entry list panel and Enhanced Entry View panel is not so friendly.

    Could we consider the double-clic (integrated in the Copy Custom String), as you mentioned in your first post ?

    If not, we may close this FR.

    Best regards,

    Thierry

     
    Last edit: ThierryP 2013-05-13
  • Paul
    Paul
    2013-05-13

    One click to highlight the entry and one click to launch the URL is easier than right click, move, hover, move, hover, click in my opinion. Same result without modification.

    You could use the Enhanced Entry View plug-in as this has launch options in the right click menu.

    cheers, Paul

     
  • ThierryP
    ThierryP
    2013-05-13

    OK.

    Thanks for the time you spent on this.

    Best regards.

    Thierry

     
  • Marc Laporte
    Marc Laporte
    2014-08-06

    Hi!

    Once you have accessed your server via WinSCP, perhaps you can do CTRL-P to start Putty?
    http://winscp.net/eng/docs/integration_putty

    Best regards,

    M ;-)