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

Custom URL's in entry preview panel are launched incorrectly #2395

Closed
Mr-Groch opened this issue Oct 18, 2018 · 8 comments
Closed

Custom URL's in entry preview panel are launched incorrectly #2395

Mr-Groch opened this issue Oct 18, 2018 · 8 comments
Labels
Milestone

Comments

@Mr-Groch
Copy link

Expected Behavior

When URL field contains custom registered URL handler, for example rdp:// then system URL handler should be fired. It was working in 2.3.3 version.

Current Behavior

In 2.3.4 version double click on url starting with custom url like rdp:// does nothing.

Debug Info

KeePassXC - Wersja 2.3.4
Rewizja: 6fe821c

Biblioteki:

  • Qt 5.11.1
  • libgcrypt 1.8.3

System operacyjny: Windows 10 (10.0)
Architektura CPU: x86_64
Jądro: winnt 10.0.17134

Włączone rozszerzenia:

  • Auto-Type
  • Browser Integration
  • Legacy Browser Integration (KeePassHTTP)
  • SSH Agent
  • YubiKey
@droidmonkey
Copy link
Member

This was likely introduced with #1768. The fix may be related to what was done in #2311

@droidmonkey droidmonkey added this to the v2.4.0 milestone Oct 18, 2018
@Niko-CZ
Copy link

Niko-CZ commented Oct 29, 2018

This was likely introduced with #1768. The fix may be related to what was done in #2311

Is it possible to have "cmd://" to be considered as custom URL after correction and handled based on OS properties?
In this case Windows and MacOS may use "open URL" for same entry without any additional corrections. F.e. for putty on Windows standard URL will be:
cmd://putty.exe -ssh {NOTES} -X -l {USERNAME} -pw {PASSWORD}
On MacOS with dummy app handling "cmd://", it will be possible to choose related app based on cmd://app.
At the moment all URLs starting with "cmd://" are handled by browser and opened with "https://" prefix.

@droidmonkey
Copy link
Member

droidmonkey commented Oct 30, 2018

cmd:// urls are not handled by the browser. See code around

if (cmdString.startsWith("cmd://")) {

@Niko-CZ
Copy link

Niko-CZ commented Oct 30, 2018

Not sure how does it work....
Please check 2 screenshots in attachments. First one is for 2.3.4. I have just showed what is opening.
Second one is from 2.3.3. In that version even URL showed in form of [https://], beside the fact that in item modification it is visible that it is in regular windows form [cmd://putty.exe -ssh {NOTES} -X -l {USERNAME} -pw {PASSWORD}].
image
image

@droidmonkey
Copy link
Member

droidmonkey commented Oct 30, 2018

Yup that's a bug. When you click the link in the preview panel it opens the browser (this is because it is resolving the URL within the cmd to form the link in the first place). When you double click the URL field in the entry view, it properly executes the command. Captured in #2438.

@droidmonkey droidmonkey changed the title custom urls stoped working on 2.3.4 Custom URL's in entry preview panel are launched incorrectly Jan 16, 2019
@droidmonkey droidmonkey modified the milestones: v2.4.0, v2.4.1 Jan 16, 2019
@pmorch
Copy link

pmorch commented Jan 29, 2019

Linux workaround:

In linux xdg-open can launch standard and custom-registered URL-schemes. So in 2.3.3 a URL of:

my-scheme://{USERNAME}:{PASSWORD}@server

worked (if configured correctly in ~/.local/share/applications) but it doesn't in 2.3.4. The workaround in 2.3.4 is to use this URL instead:

cmd://xdg-open my-scheme://{USERNAME}:{PASSWORD}@server

( Is there any reason for not calling xdg-open on linux or open on macOS for every non-http/https/cmd URL and let it up the configuration of the desktop environment to open the correct browser/application? )

@droidmonkey
Copy link
Member

That is the bug

@droidmonkey droidmonkey modified the milestones: v2.4.1, v2.4.2 Apr 12, 2019
@SohamG
Copy link
Contributor

SohamG commented May 18, 2019

Should be fixed in #3153

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

No branches or pull requests

5 participants