Disallow DKIM L

pull/215/head
M66B 5 months ago
parent 74a92c9e67
commit fbc120d099

@ -2512,13 +2512,8 @@ public class MessageHelper {
throw new IllegalArgumentException(c[1]); throw new IllegalArgumentException(c[1]);
String length = kv.get("l"); String length = kv.get("l");
if (!TextUtils.isEmpty(length) && TextUtils.isDigitsOnly(length)) { if (!TextUtils.isEmpty(length))
int l = Integer.parseInt(length); throw new IllegalArgumentException("Length l=" + length);
if (l < DKIM_MIN_TEXT)
throw new IllegalArgumentException("Body length " + l + " < " + DKIM_MIN_TEXT);
if (l < body.length())
body = body.substring(0, l);
}
Log.i("DKIM body=" + body.replace("\r\n", "|")); Log.i("DKIM body=" + body.replace("\r\n", "|"));

Loading…
Cancel
Save