mirror of
https://github.com/pocket-id/pocket-id.git
synced 2025-12-06 09:13:19 +03:00
[PR #138] [MERGED] fix: ensure the downloaded GeoLite2 DB is not corrupted & prevent RW race condition #944
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/pocket-id/pocket-id/pull/138
Author: @wargio
Created: 1/20/2025
Status: ✅ Merged
Merged: 1/20/2025
Merged by: @stonith404
Base:
main← Head:fix-race-condition-mmdb📝 Commits (2)
bdfefd3Ensure the downloaded mmdb is not corrupted & prevent RW race condition.51404caRun go fmt globally & remove 0xa0 char from Dockerfile📊 Changes
5 files changed (+53 additions, -18 deletions)
View changed files
📝
Dockerfile(+1 -1)📝
backend/internal/dto/app_config_dto.go(+2 -2)📝
backend/internal/model/app_config.go(+8 -8)📝
backend/internal/service/app_config_service.go(+2 -2)📝
backend/internal/service/geolite_service.go(+40 -5)📄 Description
This fixes a race condition while updating the mmdb, ensures the downloaded file is not corrupted and avoids pocket-id not being able to generate audit logs with locations due a bad database.
In github you cannot see the char replaced but this is the one.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.