Commit Graph
63 Commits
Author SHA1 Message Date
Kyle Kneitinger 341635f6bd Replace Google with DuckDuckGo as the optional fallback favicon fetcher (#2309)
* Replace Google with DuckDuckGo for optional fallback favicon fetch URL
Modify the work initially done in #36, and most recently modified in #1786,
to use DuckDuckGo's https://icons.duckduckgo.com/ip3/www.example.com.ico
favicon endpoint.

Fixes #2258

* Close failed favicon fetch progress bars

Name the UrlFetchProgressDialog() with the corresponding URL in order to
be identified by name by its parent when the failed request is handeled
in EditWidgetIcons::fetchFinished(). fetchFinished() retrieves the
relevant UrlFetchProgressDialog() and calls close() on it.

Fixes: #2265
2018-09-20 21:52:51 -04:00
Jonathan White ca27fb06d5 Merge branch 'master'
Conflicts:
	INSTALL.md
	release-tool
	src/browser/BrowserOptionDialog.cpp
	src/browser/BrowserService.cpp
	src/browser/BrowserService.h
	src/browser/NativeMessagingBase.h
	src/browser/NativeMessagingHost.h
	src/core/Uuid.cpp
	src/gui/DatabaseTabWidget.cpp
	src/gui/DatabaseWidget.cpp
	src/gui/EditWidget.cpp
	src/gui/MainWindow.cpp
	src/gui/MainWindow.ui
	src/proxy/NativeMessagingHost.h
	src/sshagent/ASN1Key.cpp
2018-08-24 09:42:38 -04:00
Jonathan White 8db604e787 Fix occasional divide by zero crash 2018-08-18 10:31:40 -04:00
pasdam ad4423d226 Replaced Uuid with QUuid 2018-07-06 22:23:49 -04:00
Jonathan White f9eef6d986 Merge pull request #2011 from keepassxreboot/fix/favicon-multiselect
Allow multiple image selections when adding favicons
2018-06-20 20:32:40 -04:00
seregaxvm e124f17c64 Add advanced password generator features (#1841)
* Split between simple and advanced features
* Finetune password character groups
* Support for hex passwords
2018-06-10 22:37:09 -04:00
Jonathan White 76102ee9f0 Correct plurals and logic gate 2018-06-09 16:58:46 -04:00
Jonathan White 2e292699b7 Add more comprehensive messages when adding custom icons
* Error messages now display for 15 seconds and are closable
* Add button is always enabled
2018-06-09 16:58:46 -04:00
Jonathan White b07d4efe5f Allow multiple image selections when adding favicons 2018-06-09 16:58:41 -04:00
Jonathan White b16447b13d Fix occasional crash when favicon progress dialog is closed (#1980)
* Changed progress dialog to a true percentage calculation
* Removed some unnecessary code
2018-05-20 21:12:06 -04:00
Jonathan White aae6d09fd3 Merge branch 'master' into develop
Conflicts:
	src/CMakeLists.txt
	src/autotype/xcb/AutoTypeXCB.cpp
	src/browser/BrowserAction.cpp
	src/browser/BrowserService.cpp
	src/browser/BrowserService.h
	src/browser/BrowserSettings.h
	src/browser/NativeMessagingHost.cpp
	src/browser/NativeMessagingHost.h
	src/gui/EditWidgetIcons.cpp
	src/gui/EditWidgetIcons.h
	src/gui/MainWindow.cpp
	src/proxy/NativeMessagingHost.cpp
	tests/TestOpenSSHKey.cpp
2018-05-07 23:24:30 -04:00
Steven Noonan 056bbaa921 Improve fetch favicon (#1786)
* Eliminate dependency on libcurl in favor of Qt5Network code
* Supports older Qt versions without QNetworkRequest::FollowRedirectsAttribute

* Show a progress dialog when downloading the favicon. The main utility
  of this is giving the user the option to cancel a download attempt
  (e.g. if it's taking too long). Canceling will try the next fallback URL in the list.

* Try three different ways to obtain the favicon, in this order:
  1) Direct to fully-qualified domain (e.g. https://foo.bar.example.com/favicon.ico)
  2) Direct to 2nd-level domain (e.g. https://example.com/favicon.ico)
  3) Google lookup for 2nd-level domain name (if enabled in settings)

I changed the Google lookup, because a match is more likely to be found
for the 2nd level domain than for the fully-qualified name.

Google's error behavior is strange. If it doesn't find a match, it
doesn't return an error. Instead, it returns a generic default icon,
which is not really the desired result. This also means that unless we
have some way to detect that we've received the generic icon, we can't
fall back to any alternatives.

Signed-off-by: Steven Noonan <[email protected]>
2018-04-04 22:18:58 -04:00
Louis-Bertrand Varin 8324d03f0a Formatting the code. 2018-03-31 16:01:30 -04:00
Daniel Wilches 78ef6f0d04 Grey out Apply button when there are no changes
Resolves #1313

What this commit does:
* Whenever the Apply button is pressed, and if the save was successful, then the Apply button is disabled.
* Each subwidget used by EditEntryWidget has now a signal called `widgetUpdated` that is emitted when the widgets' internal content changes. The EditEntryWidget subscribes to that signal to know when to enable the Apply button (by calling `entryUpdated()`).
* There are some views that are not isolated in their own widgets (`m_advancedUi`, for example) so in those cases I invoked `entryUpdated()` directly whenever I detected an update:
  * some updates occur directly in a Qt widget like when editing the text of a QLineItem, so in that case I connected the widget's signals directly to the `entryUpdated()` slot.
  * some updates occur in EditEntryWidget, so in those cases the invocation to `entryUpdated()` is made as soon as the change is detected (for example when the user has confirmed an action in a dialog).

A known problem: there are some situations when the Apply button will get enabled even if there are no changes, this is because the app changes the value of a field by itself so it's considered an update (for example, clicking on the "Reveal" button changes the text shown in a text field).
The solution to this can be a bit complicated: disabling temporarily the `entryUpdated()` whenever the app is going to do an action with such side-effects.
So I preferred to let the Apply button get enabled in those cases.
2018-03-29 18:35:08 -07:00
Edward Jones 963a7802d1 Fix pluralization of confirmation prompts 2018-03-13 20:41:16 +00:00
Janek Bevendorff 63d34ac348 Add User-Agent header and set request timeout to avoid infinite download hangs
Resolves #1573, resolves #1645
2018-03-06 16:06:44 +01:00
Janek Bevendorff 59f17ab8f3 Fix missing Qt platform styles and CA bundles in Windows release deployment 2018-02-27 21:16:59 +01:00
Jonathan White 490e92167d Replace qhttp client with curl for favicon downloading (#1460)
Replace qhttp client with curl for favicon downloading
2018-02-07 07:10:56 -05:00
Janek Bevendorff cfe8ca9836 Always initialize m_httpClient to nullptr to avoid accidental dereferencing, resolves #1410 2018-01-20 14:45:22 +01:00
Janek Bevendorff f520a0f272 Deprecate KeePassHTTP and introduce WITH_XC_NETWORKING CMake option 2018-01-19 20:40:54 +01:00
Jonathan White 157f1134bf Select custom icon radio button after successful download 2017-10-07 08:49:14 -04:00
Jonathan White cb0b948603 Multiple fixes to custom icon downloading
* Fixes #904, icons are saved at or below 128x128
* Fixes #403, crash occurs due to dialog on non-gui thread
* Fixes #232, icon hashes calculated and compared against
2017-09-29 09:01:55 -04:00
thez3ro 8ed8e57012 use percentEncoding for url query 2017-07-18 18:40:18 +02:00
thez3ro 691e60d72b check if url is valid 2017-07-18 18:40:18 +02:00
thez3ro a888de19cd update m_url scheme after fallback to http 2017-07-18 18:40:18 +02:00
thez3ro 9ceadac299 fix google favicon download over https 2017-07-18 18:40:18 +02:00
thez3ro 35c6df2535 resolve URL for correct favicon downloading, fixes #240 #238 2017-07-18 18:40:18 +02:00
Janek Bevendorff e555937214 Make favicon Google fallback optional and off by default 2017-06-29 00:32:47 +02:00
thez3ro a53b111182 Update and fix copyright headers 2017-06-14 15:54:43 +02:00
Janek Bevendorff 8d487d31a4 Replace Q_EMIT, Q_SIGNALS and Q_SLOTS macros with MOC keywords 2017-03-10 16:12:02 +01:00
Janek Bevendorff da0afd3939 Fix compiler warnings 2017-03-10 16:11:52 +01:00
Jonathan White e81564387c Cleanup 2017-03-02 19:49:32 -05:00
Jonathan White 3139ae1528 WITH_XC_AUTOTYPE defaults to ON and WITH_XC_HTTP includes ALL networking 2017-03-02 18:44:01 -05:00
Jonathan White 4061fc7cf8 Delete a custom icon with multiple entries using it (#357)
* Made it possible to delete a custom icon with multiple entries using it
2017-02-28 22:45:40 -05:00
Janek Bevendorff e0e6f2b8e9 Merge branch 'release/2.1.2' into develop 2017-02-17 04:03:12 +01:00
Janek Bevendorff c2f3396753 Re-implement favicon fetching with QHttp, resolves #306 2017-02-16 21:25:04 -05:00
Janek Bevendorff 94f8650ca4 Rename KMessageWidget files to match our coding style 2017-02-10 02:34:16 +01:00
Pedro Alves 13c85cdfcb Replace MessageBox with MessageWidget in remaining classes.
Chnage to one method to set MessageWidget text passing type as
parameter.
Only messages with questions requiring user input reamin using
MessageBox dialog.
Use signal/slots to set message in MessageWidget and hide message,
signal/slots only used when required.Maybe need to change all calls to
signals/slots in the future.
2017-02-10 02:26:00 +01:00
Louis-Bertrand Varin 3c9054c36f Fixes #225 : downloading favicon crash 2017-01-27 13:49:33 -05:00
Manolis Agkopian 119af3d760 Fetch favicon from the root of the website and use Google as a fallback (#36)
* Replace favicon fetching using Google with fetching from the root of the website
* Follow up to 3 http redirects for the favicon
* Add download favicon from Google as fallback
* Move code responsible for fetching the favicon from Google on its own function to reduce repetitiveness.
2016-10-11 18:04:44 -04:00
Jonathan White c4b3f08618 Download favorite icon of entry url and add to the custom icon registry (#30)
* Favicon download button.
* Simplified icon grabbing code
2016-10-05 23:10:06 -04:00
Felix Geyer fff9e7ac46 Convert Q_FOREACH loops to C++11 for loops.
Q_FOREACH will de deprecated soon.
2016-10-02 21:45:55 -04:00
Felix Geyer 8f87b5cfd4 Split EditWidgetIcons::save() into state() and reset(). 2016-10-02 21:45:54 -04:00
Felix Geyer c78822f6e6 Merge branch '2.0' 2016-10-02 21:45:54 -04:00
Felix Geyer 57ec558396 Detect image format solely on content.
Otherwise reading fails if the file extension is wrong.

Closes #512
2016-07-31 15:36:29 +02:00
Felix Geyer 6e2de1cd79 Display proper error message when reading an icon fails.
Refs #512
2016-07-31 14:44:45 +02:00
Felix Geyer 71d4cb781d Merge branch '2.0' 2016-01-29 17:22:37 +01:00
Felix Geyer 93585aded7 Always display scaled custom icons.
Closes #322
2016-01-26 22:44:38 +01:00
Felix Geyer 7fa0eddc5f Make C++11 mandatory. 2015-09-12 13:55:50 +02:00
Felix Geyer b055d524e8 Merge branch 'lockdb' 2015-04-05 10:38:58 +02:00