mirror of
https://github.com/M66B/FairEmail.git
synced 2026-01-15 17:19:23 +01:00
Prevent crash
This commit is contained in:
@@ -297,8 +297,11 @@ public class MessageHelper {
|
||||
|
||||
final ContentType cts = new ContentType(attachment.type);
|
||||
String micalg = cts.getParameter("micalg");
|
||||
if (TextUtils.isEmpty(micalg))
|
||||
Log.e("PGP micalg missing");
|
||||
ParameterList params = cts.getParameterList();
|
||||
params.remove("micalg");
|
||||
if (params != null)
|
||||
params.remove("micalg");
|
||||
cts.setParameterList(params);
|
||||
|
||||
// Build signature
|
||||
@@ -378,8 +381,13 @@ public class MessageHelper {
|
||||
|
||||
final ContentType cts = new ContentType(attachment.type);
|
||||
String micalg = cts.getParameter("micalg");
|
||||
if (TextUtils.isEmpty(micalg)) {
|
||||
Log.e("S/MIME micalg missing");
|
||||
micalg = "sha-256";
|
||||
}
|
||||
ParameterList params = cts.getParameterList();
|
||||
params.remove("micalg");
|
||||
if (params != null)
|
||||
params.remove("micalg");
|
||||
cts.setParameterList(params);
|
||||
|
||||
// Build signature
|
||||
|
||||
Reference in New Issue
Block a user