mirror of
https://github.com/M66B/FairEmail.git
synced 2025-02-24 07:01:05 +00:00
Check for infinite max message size
This commit is contained in:
parent
699d382028
commit
5d1c07e1bc
1 changed files with 6 additions and 2 deletions
|
@ -635,9 +635,13 @@ public class EmailService implements AutoCloseable {
|
|||
}
|
||||
|
||||
Long getMaxSize() {
|
||||
// https://tools.ietf.org/html/rfc1870
|
||||
String size = getTransport().getExtensionParameter("SIZE");
|
||||
if (!TextUtils.isEmpty(size) && TextUtils.isDigitsOnly(size))
|
||||
return Long.parseLong(size);
|
||||
if (!TextUtils.isEmpty(size) && TextUtils.isDigitsOnly(size)) {
|
||||
long s = Long.parseLong(size);
|
||||
if (s != 0) // Not infinite
|
||||
return s;
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
|
|
Loading…
Reference in a new issue