[GH-ISSUE #414] Whitelist can cause messages to get sent to syncURLs twice #293

Closed
opened 2026-02-28 01:24:01 +03:00 by kerem · 0 comments
Owner

Originally created by @alxndrsn on GitHub (Apr 7, 2016).
Original GitHub issue: https://github.com/ushahidi/SMSSync/issues/414

Originally assigned to: @eyedol on GitHub.

If the whitelist is enabled, and an SMS arrives from a number in the whitelist, it will be forwarded to this number twice*:

https://github.com/alxndrsn/SMSSync/blob/develop/smssync/src/main/java/org/addhen/smssync/data/message/PostMessage.java#L108 summarises as:

for (SyncUrl syncUrl : syncUrlList) {
    if (WHITELIST ENABLED) {
        if (NUMBER IN WHITELIST) {
            ATTEMPT TO SEND MESSAGE
        }
    }

    if (BLACKLIST ENABLED)) {
        if (NUMBER IN BLACKLIST) {
            IGNORE
        } else {
            ATTEMPT TO SEND MESSAGE
        }
    } else {
        ATTEMPT TO SEND MESSAGE
    }
}

N.B. if the number is in BOTH whitelist AND blacklist, and blacklist is also enabled, then the message will only be forwarded once*
**This ignores the bug filed at https://github.com/ushahidi/SMSSync/issues/413!

Originally created by @alxndrsn on GitHub (Apr 7, 2016). Original GitHub issue: https://github.com/ushahidi/SMSSync/issues/414 Originally assigned to: @eyedol on GitHub. If the whitelist is enabled, and an SMS arrives from a number in the whitelist, it will be forwarded to this number twice*: https://github.com/alxndrsn/SMSSync/blob/develop/smssync/src/main/java/org/addhen/smssync/data/message/PostMessage.java#L108 summarises as: ``` java for (SyncUrl syncUrl : syncUrlList) { if (WHITELIST ENABLED) { if (NUMBER IN WHITELIST) { ATTEMPT TO SEND MESSAGE } } if (BLACKLIST ENABLED)) { if (NUMBER IN BLACKLIST) { IGNORE } else { ATTEMPT TO SEND MESSAGE } } else { ATTEMPT TO SEND MESSAGE } } ``` _N.B. if the number is in BOTH whitelist AND blacklist, and blacklist is also enabled, then the message will only be forwarded once_* **This ignores the bug filed at https://github.com/ushahidi/SMSSync/issues/413!
kerem closed this issue 2026-02-28 01:24:02 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/SMSSync#293
No description provided.