mirror of
https://github.com/oxen-io/session-android.git
synced 2025-12-26 03:26:45 +00:00
Make E164 log scrubber redact numbers of length >= 7.
This commit is contained in:
@@ -32,9 +32,10 @@ public final class Scrubber {
|
||||
|
||||
/**
|
||||
* The middle group will be censored.
|
||||
* Supposedly, the shortest international phone numbers in use contain seven digits.
|
||||
* Handles URL encoded +, %2B
|
||||
*/
|
||||
private static final Pattern E164_PATTERN = Pattern.compile("(\\+|%2B)(\\d{8,13})(\\d{2})");
|
||||
private static final Pattern E164_PATTERN = Pattern.compile("(\\+|%2B)(\\d{5,13})(\\d{2})");
|
||||
private static final String E164_CENSOR = "*************";
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user