Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#1838 Add urlencode option to T-CONV

KeePass_2.x
closed
nobody
None
5
2014-03-24
2014-03-21
eraser
No

I have a password containing the '/' character and when trying to use the following schema for the URL: http://{USERNAME}:{PASSWORD}@site.com the slash breaks the URL. When trying to open the URL, it says "The system could not find the specified file". If I manually replace the {PASSWORD} with an urlencoded version (e.g. from h**p://www.url-encode-decode.com) everything works fine.

Using {T-REPLACE-RX/{PASSWORD}///%2F/} also won't fix the problem because of obvious reasons ;)
There are only two solutions as a workaround:
a) changing the password (not possible with this one here) or
b) not use {USERNAME}:{PASSWORD}@ and simply login using the .htacces dialog afterwards, yet this means to give up a bit of the comfort Keepass provides.

I think adding an urlencode option to T-CONV like {T-CONV/{USERNAME}/urlencode/} (or something like that) would be a great addition to Keepass 2 which could come in handy when using unicode or other special characters as parameters for internet urls.

Discussion

  • Dominik Reichl
    Dominik Reichl
    2014-03-24

    You could have used {T-REPLACE-RX:!{PASSWORD}!/!%2F!}. Anyway, this of course only replaces '/' by '%2F'; all other reserved characters are not converted.

    Thus I've now added a T-CONV option (namely 'Uri') to URI-encode a string. Example: {T-CONV:!{PASSWORD}!Uri!}.

    Here's the latest development snapshot for testing:
    http://keepass.info/filepool/KeePass_140324.zip

    Thanks and best regards,
    Dominik

     
    • eraser
      eraser
      2014-03-25

      Thank you very much, it works like a charm :)

       
  • Dominik Reichl
    Dominik Reichl
    2014-03-24

    • status: open --> closed
    • Priority: 4 --> 5