Fix SSLHandshake Exception by using bypass#7657
Conversation
|
You can ignore the fetcher and the mac test. But please have a look at the Checkstyle test. Either click on details at the failing or you can go to the files changes tab to see the Reviewdog comments |
| urlDownload.canBeReached(); | ||
| } catch (kong.unirest.UnirestException ex) { | ||
| if (ex.getCause() instanceof javax.net.ssl.SSLHandshakeException) { | ||
| if (dialogService.showConfirmationDialogAndWait(Localization.lang("Download file"), |
There was a problem hiding this comment.
Do we really need to ask the user, or should we just bypass ssl verification? For example, firefox downloads the linked pdf without any prompt.
There was a problem hiding this comment.
I think that bypassing SSL verification should let users know.
We can add an option in the preferences to allow users to select all downloads to bypass the verification. The advantage of this feature that the user does not need to click on the trusted site every time. The disadvantage is that the code changes may be a bit big.
But I found that JabRef uses URLDownload.bypassSSLVerification() directly in some places, such as org.jabref.logic.importer.fetcher.IEEE#getURLForQuery, line 253.
There was a problem hiding this comment.
I think it's okay to show a dialog here. Should not happen that often.
| URLDownload.bypassSSLVerification(); | ||
| return true; | ||
| } else { | ||
| dialogService.showInformationDialogAndWait(Localization.lang("Download file"), |
There was a problem hiding this comment.
I would use notify here, so that the user doesn't need to click "ok" again in the second dialog.
There was a problem hiding this comment.
Great, I agree with this idea!
…ationDialog to prompt the user.
|
Just a minor improvement for the variable naming, otherwise lgtm! |
…ownload.java Update the variable naming in src/main/java/org/jabref/logic/net/URLDownload.java, function setSSLVerification(). Co-authored-by: Christoph <siedlerkiller@gmail.com>
|
@Siedlerchr @tobiasdiez Thank you so much for your suggestions and help! |
Fix the bug of the variable name change.
|
We have to thiank you for your contribution @ryyyc ! |
…om.tngtech.archunit-archunit-junit5-api-0.18.0 * upstream/main: Fix exception when searching (#7659) Fixes Jabref#7660 (#7663) Fix for issue 5850: Journal abbreviations in UTF-8 not recognized (#7639) Fix SSLHandshake Exception by using bypass (#7657) Fix for issue 7633: Unable to download arXiv pdfs if Title contains curly brackets (#7652) Fix#7195 partly Opacity of disabled icon-buttons

Fixes #7616
CHANGELOG.mddescribed in a way that is understandable for the average user (if applicable)File download path: https://www.serbski-institut.de/os/dnlarchiv/Kleine_Reihe_27_web.2217.pdf
A valid authentication path cannot be found from the site where the downloaded file is located, prompting the user with the option of whether to continue the download.

The user chooses to cancel the download.

The user chooses to download anyway.
