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

Bugfix NPE & Convert to Kotlin SSL Untrusted Cert Dialog #13076

Merged
merged 4 commits into from
Jun 7, 2024

Conversation

alperozturk96
Copy link
Collaborator

@alperozturk96 alperozturk96 commented Jun 6, 2024

  • Tests written, or not not needed

Previously SSL Untrusted Cert Dialog was java file and a lot of nullable variable used everywhere. I checked our crash reports and a lot of user affected because of NPE. This PR converts java file to Kotlin and safely uses the variables.

@tobiasKaminsky
Copy link
Member

How can I test this dialog?
With login v1 I could use my self signed cert on test server, but now with v2?

Signed-off-by: alperozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
@alperozturk96 alperozturk96 force-pushed the bugfix/npe-SslUntrustedCertDialog branch from 3aa91b5 to be55d52 Compare June 6, 2024 12:23
Signed-off-by: alperozturk <[email protected]>
@alperozturk96
Copy link
Collaborator Author

alperozturk96 commented Jun 6, 2024

How can I test this dialog? With login v1 I could use my self signed cert on test server, but now with v2?

How can I test this dialog? With login v1 I could use my self signed cert on test server, but now with v2?

IDK. What's the difference for certificate between v1 and v2? Can't you create certificate for v2 manually?

I tested the dialog by calling it from FileDisplayActivity and manually creating a certificate, which I then passed to the dialog's constructor.

Copy link

github-actions bot commented Jun 6, 2024

APK file: https://www.kaminsky.me/nc-dev/android-artifacts/13076.apk

qrcode

To test this change/fix you can simply download above APK file and install and test it in parallel to your existing Nextcloud app.

Copy link

github-actions bot commented Jun 6, 2024

Codacy

Lint

TypemasterPR
Warnings7070
Errors33

SpotBugs

CategoryBaseNew
Bad practice6464
Correctness6969
Dodgy code346343
Experimental11
Internationalization77
Malicious code vulnerability22
Multithreaded correctness66
Performance5757
Security1919
Total571568

@tobiasKaminsky
Copy link
Member

Right… I was wrong with that one…

@alperozturk96 alperozturk96 merged commit 4f2fdbc into master Jun 7, 2024
21 checks passed
@delete-merged-branch delete-merged-branch bot deleted the bugfix/npe-SslUntrustedCertDialog branch June 7, 2024 11:39
@alperozturk96
Copy link
Collaborator Author

/backport to stable-3.29

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

Successfully merging this pull request may close these issues.

2 participants