-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Improve error message when browser proxy cannot be found #9385
Conversation
I don't understand why this is necessary |
From very practical point of view:This simple and low-risk warning “fix” dramatically reduces the pain in those rare cases when the proxy is not placed correctly by the package manager or user (which is difficult to test and verify both for out-of-the box and manual configuration – cases, so such a mistake can easily happen but is hard for root-cause). From engineering and robustness point of view:It is necessary because when the application is updating the native messaging manifests (as requested by the user) it is publishing (a set of) interfaces. If the interfaces published are known to be wrong, then they should not be... or at least the user should be informed that his/her request is not resulting in a working interface. |
I don't understand this. Are you saying you installed keepassxc using 'official' sources and the proxy was not installed? That is simply not possible, especially for snap and flatpak. Also a popup is not desired. I believe we already show an error message in the browser settings if you misconfigure the custom proxy setting. |
I am pretty sure I installed it from an official place ... I started building the project simply because no matter what I did there was always an error message like "exchange of keys was not successful" in the browser extension. Looking at the pre-compiler complexity of the proxy executable path calculation (
Here I agree completely :) Please let me know if this would be accepted.
I am sure that this is not the case, because I remember typing wrong string as custom proxy and it was accepted. |
You absolutely do not need to make function prototype changes to display a warning message. I wouldn't display it in the mainwindow warning box anyway. Just show a warning exactly how the custom proxy warning is done... |
Reworked the path validation by moving it completely to the ui. 1. Still possible to improve1.1 UIThere is one more "gap": if (1) the user edits manually the custom-proxy setting and gets it wrong and (2) immediately his OK (or for some errors moves off the settings tab to another tab) then the error will be "shown" but not visible by the use because the page is not already there. Unfortunately, the only way to make sure that the user sees the error in such a case to show a pop-up (unless we want to show it in the top-most WarningWidget ..., which is even worse IMHO) ==> As this was never implemented - I consider it is not as a blocking point for the pull-request? 1.2 The data store layerThe settings-store layer ( 2. Important notesThe old 3. Screenshot(s)4. REMARK:The test "21 testmerge (Failed)": it is not because of the changes here because it was failing even before the changes in this pull-request.Here is full log of the tests
|
Would this Pull Request be accepted? |
Gotta review it but sure |
Both amendments to cover review result are in commit b3478a5. |
Names update done. |
Please use |
It is possible in most or even all places with initializers in the declaration line. Still, I really prefer to keep the variable type static and predefined. That is, imho it is preferred that the compiler catches a potential issue when types change vs the convenience of less changes (and code checks when types change). For instance, in the following code all these declarations could use // check the rest of the dependency and set the warning message when needed for the complete dependency
bool isValid = true;
bool isUiBrowseIntegrationEnabled = m_ui->enableBrowserSupport->isChecked();
QString warning = tr("<b>Error: </b>");
QString info = tr("<b>Info: </b>"); _I believe that this should be acceptable. _
Done with commit 0a0f60b. Further, all checks do pass now👍 I would highly appreciate if a more exhaustive list of issues is fed back at once instead of piece by piece. |
There is no such thing as dynamic typing in C++, auto is just a shortcut where there is no ambiguity on the type. Declaring a type absolutely does not prevent or protect you from implicit type conversions. For bool I prefer to write it out as there is no savings in programmer time, but for classes and templated types absolutely use I'll be doing a full review now and squashing to commits. Also please don't do the "merge latest develop" into a PR. It creates a lot of noise and a sloppy commit graph. |
Thanks for the comment. I agree with the "sloppy commit graph" comment ... Indeed, I would like to minimize the commits (or even just have one) and improve the commit graphs for future PRs. This would be hard or impossible if I cannot use the CI before I commit. Indeed, any hint how to use the project CI before committing (or with squashing) will be appreciated. |
You would just squash the commits, rebase onto develop, then run the tests locally on your computer. Adding commits linearly is fine, just rebase onto develop, don't merge it in. We will squash everything down to one commit before final merge. I reviewed the PR and made wholesale changes to the code and messages. To be honest, I did not like your implementation. There was a ton of code and the messages were hard to understand. This is what the final implementation looks like (I also added red shading and tooltip to the custom proxy field when it is invalid): |
* Highlight custom proxy text box if the executable cannot be found
Co-authored-by: Blessio <[email protected]> Co-authored-by: Jonathan White <[email protected]>
Release 2.7.6 Changes - Significant improvement to visual when drag/drop entries [keepassxreboot#9698] - Automatically prompt for Quick Unlock when showing unlock dialog [keepassxreboot#9697] - Improve colorful lock icon and fix file MIME icon on KDE [keepassxreboot#9632] - Ability to search by entry UUID [keepassxreboot#9571] - Add challenge-response support for NitroKey 3 [keepassxreboot#9631] - Auto-Type: Disable entry level Auto-Type when disabled at group/entry [keepassxreboot#9672] - Browser: Show warning when adding duplicate URL's to entry [keepassxreboot#9588][keepassxreboot#9635] - Browser: Improve error message when proxy cannot be found [keepassxreboot#9385] Fixes - Fix crash on exit on macOS [keepassxreboot#9620] - Fix crash on search if entry doesn't have a group [keepassxreboot#9633] - Fix several issues with Quick Unlock [keepassxreboot#9697] - Enable save button when not auto-saving non-data changes [keepassxreboot#9634] - Several UI/UX fixes [keepassxreboot#9647] - Move toolbar back to top of window when disabling movement [keepassxreboot#9699] - Browser: Fix closing password generator dialog with X button [keepassxreboot#9636] - Browser: Fix handling of expired credentials [keepassxreboot#9595] - Windows: Prevent white flicker when launching application [keepassxreboot#9637] - Linux: Fix warning message about allow screencapture [keepassxreboot#9638] - FdoSecrets: Fix access confirmation dialog showing even when disabled [keepassxreboot#9690] # -----BEGIN PGP SIGNATURE----- # # iQJIBAABCAAyFiEE6A9nU7OzJX8m9B8ILPQdKqhDj5kFAmTb/usUHGphbmVrQGtl # ZXBhc3N4Yy5vcmcACgkQLPQdKqhDj5l9vBAAmiCQR+L3ZLVq7CfXK+yOrCr1pV1J # H6znrRe4SC5MR/dyrx+EVbkaPI0aWtW/NWa4REB9BUxkbXKIPy/9M6smj3xkjAqX # YuYThNneRBFns9Rb5RyAIonwEXXmYHAWG2wdRXXFOnsb/Dxy9DYZK6+Ysbj55CQJ # RBJ1y0IKCuajLvENW9zQQ/vTX0oxCQ2F9Fz7aTqGIoxW6NMhjTso7IPvKYWPzbNj # FBOiI4kusL32pT5u+XwSUjmBvXrIEBjETYFTVgqesItAr0dFAgEh8f0jvuy8on8K # ukVzD02JqavkMfwtDsvUVLdVdr1PJMOu4/qDodR1xC39VOjS9LQ6dK8rb/1Q4/MR # cAXjBhNBZ0A5yq9XtdNvl8xYqkvYa/KcFuHUFwBoinLXtKLnh4aswDqk4caNeI4O # O40Nk5J4J6Qgs89XIsQHkXkGTaPxuISHVeFWWqcpX9kRJhtlt5eIS6nDv8nGx8iq # q65NfCldPckgmuIxeCX2lYtxieq09jAhD1/92eXsH1aNkZce4W1UcjGE58cduODd # oXV7VCo0JUzkMky9I9/G+hAqWwLp94D5ewYG8yX2Oz2jwcoWvZSIZ6MtR+2NiYpL # pFSFB/yoqWQOIVc9eHqCQl7rMMK66pJWwu7boxS22/xoNTAfzMwNtp8CmbLpqIhF # 7lPQiiC2DnqfR0E= # =l8kk # -----END PGP SIGNATURE----- # gpg: directory '/home/runner/.gnupg' created # gpg: keybox '/home/runner/.gnupg/pubring.kbx' created # gpg: Signature made Tue Aug 15 22:40:43 2023 UTC # gpg: using RSA key E80F6753B3B3257F26F41F082CF41D2AA8438F99 # gpg: issuer "[email protected]" # gpg: Can't check signature: No public key
A warning dialog-box pops up at startup stating that the proxy binary cannot be found.
Practically, this is done when updating native messaging manifests (that means checking happens not only on startup but also when advanced settings are changed). That is, if newly written settings results in no proxy found - then the warning dialog will popup also.
If the "updating of native messaging manifests" does not happen (Browser-Integration is off or a specific browser is not enabled etc.), then we assume that the user is advanced and intentionally sets up complex proxy strategy --> so checking is not done.
Screenshots
Testing strategy
Type of change