only run account options through int conversion. fixes #4390

This commit is contained in:
Daniel Gultsch 2022-10-12 11:53:57 +02:00
parent d435c1f2ae
commit 716c804353

View file

@ -110,11 +110,9 @@ public class ExportBackupService extends Service {
final String value = accountCursor.getString(i);
if (value == null || Account.ROSTERVERSION.equals(accountCursor.getColumnName(i))) {
builder.append("NULL");
} else if (value.matches("\\d+")) {
} else if (Account.OPTIONS.equals(accountCursor.getColumnName(i)) && value.matches("\\d+")) {
int intValue = Integer.parseInt(value);
if (Account.OPTIONS.equals(accountCursor.getColumnName(i))) {
intValue |= 1 << Account.OPTION_DISABLED;
}
builder.append(intValue);
} else {
appendEscapedSQLString(builder, value);