Added check for long attachment file names

pull/212/head
M66B 2 years ago
parent 3bb020cf69
commit fcb56ddf0d

@ -4881,6 +4881,10 @@ public class FragmentCompose extends FragmentBase {
Log.i(ex);
}
// https://www.rfc-editor.org/rfc/rfc2231
if (attachment.name != null && attachment.name.length() > 60)
db.attachment().setError(attachment.id, context.getString(R.string.title_attachment_filename));
} catch (Throwable ex) {
// Reset progress on failure
Log.e(ex);

@ -1661,6 +1661,7 @@
<string name="title_attachment_keywords">attached,attachment,attachments,included</string>
<string name="title_attachment_reminder">Did you intend to add an attachment?</string>
<string name="title_attachment_warning">Potentially dangerous: %1$s</string>
<string name="title_attachment_filename">Some other email clients cannot handle file names longer than 60 characters</string>
<string name="title_plain_reminder">All formatting will be lost</string>
<string name="title_dsn_reminder">Hard bounces damage the email reputation of the original sender!</string>
<string name="title_size_reminder">Message (%1$s) larger than server limit (%2$s)</string>

Loading…
Cancel
Save