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

Show URL field for all schemes. #1489

Closed
wants to merge 3 commits into from
Closed

Show URL field for all schemes. #1489

wants to merge 3 commits into from

Conversation

rominf
Copy link

@rominf rominf commented Feb 15, 2018

Description

Show URL field for all schemes.

Motivation and context

Fix #1424

How has this been tested?

Manually.

Screenshots (if appropriate):

Types of changes

  • ✅ Bug fix (non-breaking change which fixes an issue)

Checklist:

  • ✅ I have read the CONTRIBUTING document. [REQUIRED]
  • ✅ My code follows the code style of this project. [REQUIRED]
  • ✅ All new and existing tests passed. [REQUIRED]

@phoerious phoerious changed the title Fix #1424 Show URL field for all schemes. Feb 15, 2018
@phoerious
Copy link
Member

The tests are failing.

@rominf
Copy link
Author

rominf commented Feb 15, 2018

@phoerious Sorry. I fixed tests.

@TheZ3ro
Copy link
Contributor

TheZ3ro commented Feb 15, 2018

This change isn't complete as-is. Removing the check will allow ftp, cmd and other URLs in DetailsWidget and EntryModel as clickable links.

So, you removed the check from the Entry::resolveUrl function but you need to add that same check in the Entry::displayUrl function (that is calling resolveUrl)

Another thing I noticed is EntryModel (line 182) resolving reference for Entry::displayUrl but there will be no reference in it (displayUrl already resolve them).
Can you change that line with simply result = entry->displayUrl(); ?

Thanks for the contribution

@rominf
Copy link
Author

rominf commented Feb 15, 2018

@TheZ3ro

This change isn't complete as-is. Removing the check will allow ftp, cmd and other URLs in DetailsWidget and EntryModel as clickable links.

What's wrong with that? When I click on a ftp:// link, keepassxc opens Dolphin as an FTP client. That's the correct behavior in my opinion.

but you need to add that same check in the Entry::displayUrl function (that is calling resolveUrl)

Why?

@phoerious
Copy link
Member

You should also get into the habit of using speaking PR titles and commit messages. One should be able to read them without having to look up what #1424 was about.

@TheZ3ro
Copy link
Contributor

TheZ3ro commented Feb 15, 2018

Now I remember why we put those checks in the first place.
The favicon downloader (EditEntryWidget.cpp#L631 and EditWidgetIcons.cpp#L189 ) was crashing when a non-http link was inserted.
So we created the webUrl() function for http-only urls and the displayUrl() function for masking passwords in URLs.

Now with curl the favicon downloader doesn't seems to crash anymore (I tested only with an ftp url) so I think we are safe after removing the http/https check

@droidmonkey droidmonkey added this to the v2.4.0 milestone Feb 24, 2018
@TheZ3ro
Copy link
Contributor

TheZ3ro commented Mar 1, 2018

This can be merged in 2.3.1

@tycho
Copy link
Contributor

tycho commented Mar 9, 2018

IMO, this needs a better commit message than just "Fix #1424"...

@droidmonkey
Copy link
Member

Closed in favor of #1768

@droidmonkey droidmonkey closed this Apr 3, 2018
@droidmonkey droidmonkey removed this from the v2.4.0 milestone Aug 29, 2018
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

Successfully merging this pull request may close these issues.

URL not shown in entry table if scheme is not http/https
5 participants