mirror of
https://github.com/M66B/FairEmail.git
synced 2025-03-01 17:26:12 +00:00
Disallow DKIM L
This commit is contained in:
parent
74a92c9e67
commit
fbc120d099
1 changed files with 2 additions and 7 deletions
|
@ -2512,13 +2512,8 @@ public class MessageHelper {
|
|||
throw new IllegalArgumentException(c[1]);
|
||||
|
||||
String length = kv.get("l");
|
||||
if (!TextUtils.isEmpty(length) && TextUtils.isDigitsOnly(length)) {
|
||||
int l = Integer.parseInt(length);
|
||||
if (l < DKIM_MIN_TEXT)
|
||||
throw new IllegalArgumentException("Body length " + l + " < " + DKIM_MIN_TEXT);
|
||||
if (l < body.length())
|
||||
body = body.substring(0, l);
|
||||
}
|
||||
if (!TextUtils.isEmpty(length))
|
||||
throw new IllegalArgumentException("Length l=" + length);
|
||||
|
||||
Log.i("DKIM body=" + body.replace("\r\n", "|"));
|
||||
|
||||
|
|
Loading…
Reference in a new issue