From 716c804353359c7d91a4b1a72a6cd690ac419d82 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Wed, 12 Oct 2022 11:53:57 +0200 Subject: [PATCH] only run account options through int conversion. fixes #4390 --- .../siacs/conversations/services/ExportBackupService.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/main/java/eu/siacs/conversations/services/ExportBackupService.java b/src/main/java/eu/siacs/conversations/services/ExportBackupService.java index 4e144f223..9826ecbc2 100644 --- a/src/main/java/eu/siacs/conversations/services/ExportBackupService.java +++ b/src/main/java/eu/siacs/conversations/services/ExportBackupService.java @@ -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; - } + intValue |= 1 << Account.OPTION_DISABLED; builder.append(intValue); } else { appendEscapedSQLString(builder, value);