mirror of
https://github.com/binwiederhier/ntfy.git
synced 2026-05-15 15:45:49 -06:00
[GH-ISSUE #712] server/topic.Subscribe can produce duplicate subscriber IDs #520
Labels
No labels
ai-generated
android-app
android-app
android-app
build
build
dependencies
docs
enhancement
enhancement
in-progress 🏃
ios
prio:low
prio:low
pull-request
question
server
server
unified-push
web-app
website
🔒 security
🔥 HOT
🪲 bug
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/ntfy#520
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
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?
Originally created by @peterbourgon on GitHub (May 1, 2023).
Original GitHub issue: https://github.com/binwiederhier/ntfy/issues/712
6ad3b2e802/server/topic.go (L50)Nothing prevents
subscriberID := rand.Int()from producing an integer which is already present in thet.subscribersmap. In that case, the previous subscriber is over-written.@dropdevrahul commented on GitHub (May 2, 2023):
can I pick this up?
@binwiederhier commented on GitHub (May 2, 2023):
Sure thing
@dropdevrahul commented on GitHub (May 2, 2023):
@binwiederhier tried a fix with https://github.com/binwiederhier/ntfy/pull/713
@dropdevrahul commented on GitHub (May 2, 2023):
Please note Just added a simple retry mechanism and added a test case to catch the edge case
@binwiederhier commented on GitHub (May 2, 2023):
Thanks to you both. The best effort retry should be enough.