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

Infinite stacking of cached same certificates with updates #65

Closed
vstudnicka-cen66454 opened this issue Jun 6, 2022 · 2 comments · Fixed by #78
Closed

Infinite stacking of cached same certificates with updates #65

vstudnicka-cen66454 opened this issue Jun 6, 2022 · 2 comments · Fixed by #78
Assignees

Comments

@vstudnicka-cen66454
Copy link

vstudnicka-cen66454 commented Jun 6, 2022

CertStore.kt -> private fun processReceivedData(...) -> updateCachedData { cachedData -> ... }

This does check not work:
if (newCertificates.indexOf(newCertificateInfo) != -1) {
// skip entry that's already in the database
continue
}

Everytime it downloads trustlist it is checking if certificate is already in array. For every CertificateInfo it is creating new object and this code above is checking if same object is already in cachced array, but not comparing its data but only if it is same object. This results in in adding same certificate everytime it updates as it is always a newly created CerticateInfo object

image

@petrdvorak
Copy link
Member

petrdvorak commented Jun 6, 2022

@vstudnicka-cen66454 Thank you for reporting, adding @TomasKypta.

@tanvir-retailai
Copy link

@petrdvorak any update on this ticket?

TomasKypta added a commit that referenced this issue Jun 28, 2023
Fix infinite stacking of the same cached certificates
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 a pull request may close this issue.

4 participants