From 6613161b20fd6ab379d50a7996540a21ba3a5f11 Mon Sep 17 00:00:00 2001 From: Ian Macdonald Date: Fri, 11 Feb 2022 10:27:43 +0100 Subject: [PATCH] Don't nanny the user. Allow all file types as attachments. The Android client already has no such restrictions, and these are ineffective anyway, as they are based on the file's name, not its payload. --- _locales/ar/messages.json | 1 - _locales/bg/messages.json | 1 - _locales/ca/messages.json | 1 - _locales/cs/messages.json | 1 - _locales/da/messages.json | 1 - _locales/de/messages.json | 1 - _locales/el/messages.json | 1 - _locales/en/messages.json | 1 - _locales/eo/messages.json | 1 - _locales/es/messages.json | 1 - _locales/es_419/messages.json | 1 - _locales/et/messages.json | 1 - _locales/fa/messages.json | 1 - _locales/fi/messages.json | 1 - _locales/fil/messages.json | 1 - _locales/fr/messages.json | 1 - _locales/he/messages.json | 1 - _locales/hi/messages.json | 1 - _locales/hr/messages.json | 1 - _locales/hu/messages.json | 1 - _locales/id/messages.json | 1 - _locales/it/messages.json | 1 - _locales/ja/messages.json | 1 - _locales/ka/messages.json | 1 - _locales/km/messages.json | 1 - _locales/kn/messages.json | 1 - _locales/ko/messages.json | 1 - _locales/lt/messages.json | 1 - _locales/mk/messages.json | 1 - _locales/nb/messages.json | 1 - _locales/nl/messages.json | 1 - _locales/no/messages.json | 1 - _locales/pa/messages.json | 1 - _locales/pl/messages.json | 1 - _locales/pt_BR/messages.json | 1 - _locales/pt_PT/messages.json | 1 - _locales/ro/messages.json | 1 - _locales/ru/messages.json | 1 - _locales/si/messages.json | 1 - _locales/sk/messages.json | 1 - _locales/sl/messages.json | 1 - _locales/sq/messages.json | 1 - _locales/sr/messages.json | 1 - _locales/sv/messages.json | 1 - _locales/ta/messages.json | 1 - _locales/th/messages.json | 1 - _locales/tr/messages.json | 1 - _locales/uk/messages.json | 1 - _locales/uz/messages.json | 1 - _locales/vi/messages.json | 1 - _locales/zh_CN/messages.json | 1 - _locales/zh_TW/messages.json | 1 - stylesheets/_modules.scss | 20 ----------- .../conversation/SessionConversation.tsx | 5 --- .../message-content/MessageAttachment.tsx | 7 ---- ts/session/utils/Toast.tsx | 4 --- ts/test/util/isFileDangerous_test.ts | 34 ------------------- ts/types/LocalizerKeys.ts | 1 - ts/util/index.ts | 2 -- ts/util/isFileDangerous.ts | 6 ---- 60 files changed, 131 deletions(-) delete mode 100644 ts/test/util/isFileDangerous_test.ts delete mode 100644 ts/util/isFileDangerous.ts diff --git a/_locales/ar/messages.json b/_locales/ar/messages.json index 15b3e290e..8b4682eeb 100644 --- a/_locales/ar/messages.json +++ b/_locales/ar/messages.json @@ -60,7 +60,6 @@ "thisWeek": "This Week", "thisMonth": "هذا الشهر", "voiceMessage": "رسالة صوتية", - "dangerousFileType": "Attachment type not allowed for security reasons", "stagedPreviewThumbnail": "معاينة رابط الصورة المصغرة للمسودة من اجل $domain$", "previewThumbnail": "معاينة رابط الصورة المصغرة لـ $domain$", "stagedImageAttachment": "مرفق صورة المسودة: $path$", diff --git a/_locales/bg/messages.json b/_locales/bg/messages.json index 6a42fedd0..b0a64dd39 100644 --- a/_locales/bg/messages.json +++ b/_locales/bg/messages.json @@ -60,7 +60,6 @@ "thisWeek": "На Этой Неделе", "thisMonth": "В Этом Месяце", "voiceMessage": "Голосовое сообщение", - "dangerousFileType": "По соображениям безопасности этот тип файлов нельзя пересылать в приложениях.", "stagedPreviewThumbnail": "Черновик миниатюры предварительного просмотра ссылки для $domain$", "previewThumbnail": "Миниатюра предварительного просмотра ссылки для $domain$", "stagedImageAttachment": "Черновик вложения изображения: $path$", diff --git a/_locales/ca/messages.json b/_locales/ca/messages.json index d6404b3bf..26314e70f 100644 --- a/_locales/ca/messages.json +++ b/_locales/ca/messages.json @@ -60,7 +60,6 @@ "thisWeek": "Aquesta setmana", "thisMonth": "Aquest mes", "voiceMessage": "Missatge de veu", - "dangerousFileType": "Per raons de seguretat, el tipus d'adjunt no es permès ", "stagedPreviewThumbnail": "Previsualització de l'esborrany de la vista en miniatura de l'enllaç $domain$", "previewThumbnail": "Previsualització de la vista en miniatura de l'enllaç $domain$", "stagedImageAttachment": "Esborrany de la imatge adjuntada: $path$", diff --git a/_locales/cs/messages.json b/_locales/cs/messages.json index 8d476bc76..bc968cc62 100644 --- a/_locales/cs/messages.json +++ b/_locales/cs/messages.json @@ -60,7 +60,6 @@ "thisWeek": "Tento týden", "thisMonth": "Tento měsíc", "voiceMessage": "Hlasová zpráva", - "dangerousFileType": "Tento typ přílohy není povolen z bezpečnostních důvodů", "stagedPreviewThumbnail": "Draft thumbnail link preview for $domain$", "previewThumbnail": "Thumbnail link preview for $domain$", "stagedImageAttachment": "Draft image attachment: $path$", diff --git a/_locales/da/messages.json b/_locales/da/messages.json index d68cbd7b5..c90ceade4 100644 --- a/_locales/da/messages.json +++ b/_locales/da/messages.json @@ -60,7 +60,6 @@ "thisWeek": "Denne uge", "thisMonth": "Denne måned", "voiceMessage": "Talebesked", - "dangerousFileType": "Vedhæftningstype er ikke tilladt af sikkerhedsmæssige årsager", "stagedPreviewThumbnail": "Udkast miniaturebillede til eksempelvisning for $domain$", "previewThumbnail": "Miniaturebillede til eksempelvisning for $domain$", "stagedImageAttachment": "Udkast af vedhæftet billedfil: $path$", diff --git a/_locales/de/messages.json b/_locales/de/messages.json index 51cab078b..e6d92e691 100644 --- a/_locales/de/messages.json +++ b/_locales/de/messages.json @@ -60,7 +60,6 @@ "thisWeek": "Diese Woche", "thisMonth": "Diesen Monat", "voiceMessage": "Sprachnachricht", - "dangerousFileType": "Anhangstyp aus Sicherheitsgründen nicht erlaubt", "stagedPreviewThumbnail": "Miniaturbild des Link-Vorschauentwurfs für $domain$", "previewThumbnail": "Miniaturbild der Link-Vorschau für $domain$", "stagedImageAttachment": "Entwurf für Bildanhang: $path$", diff --git a/_locales/el/messages.json b/_locales/el/messages.json index 5cccdce69..dd89dfe91 100644 --- a/_locales/el/messages.json +++ b/_locales/el/messages.json @@ -60,7 +60,6 @@ "thisWeek": "Αυτή την εβδομάδα", "thisMonth": "Αυτό τον μήνα", "voiceMessage": "Φωνητικό Μήνυμα", - "dangerousFileType": "Ο τύπος του συνημμένου δεν επιτρέπεται για λόγους ασφαλείας", "stagedPreviewThumbnail": "Πρόχειρη μικρή προεσκόπιση συνδέσμου για $domain$", "previewThumbnail": "Μικρή προεσκόπιση συνδέσμου για $domain$", "stagedImageAttachment": "Πρόχειρη συνημμένη εικόνα: $path$", diff --git a/_locales/en/messages.json b/_locales/en/messages.json index 7a5363cb9..d9ee7c355 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -60,7 +60,6 @@ "thisWeek": "This week", "thisMonth": "This Month", "voiceMessage": "Voice Message", - "dangerousFileType": "For security reasons, this file type cannot be sent", "stagedPreviewThumbnail": "Draft thumbnail link preview for $domain$", "previewThumbnail": "Thumbnail link preview for $domain$", "stagedImageAttachment": "Draft image attachment: $path$", diff --git a/_locales/eo/messages.json b/_locales/eo/messages.json index cdc70afd6..069ef6c93 100644 --- a/_locales/eo/messages.json +++ b/_locales/eo/messages.json @@ -60,7 +60,6 @@ "thisWeek": "Ĉisemajne", "thisMonth": "Ĉimonate", "voiceMessage": "Voĉa mesaĝo", - "dangerousFileType": "Kunsendaĵa tipo ne permesata por sekurecaj kialoj", "stagedPreviewThumbnail": "Preparante miniaturan antaŭrigardon de ligilo pri $domain$", "previewThumbnail": "Miniatura antaŭrigardo de ligilo pri $domain$", "stagedImageAttachment": "Preparante bildan kunsendaĵon: $path$", diff --git a/_locales/es/messages.json b/_locales/es/messages.json index 1697570fe..1f16b7d1b 100644 --- a/_locales/es/messages.json +++ b/_locales/es/messages.json @@ -60,7 +60,6 @@ "thisWeek": "Esta Semana", "thisMonth": "Este Mes", "voiceMessage": "Nota de voz", - "dangerousFileType": "Tipo de adjunto no permitido por razones se seguridad", "stagedPreviewThumbnail": "Preparando miniatura de visualización de enlace para $domain$", "previewThumbnail": "Miniatura de previsualización para $domain$", "stagedImageAttachment": "Preparando adjunto múltiple: $path$", diff --git a/_locales/es_419/messages.json b/_locales/es_419/messages.json index b9a9d5bac..dee850b66 100644 --- a/_locales/es_419/messages.json +++ b/_locales/es_419/messages.json @@ -60,7 +60,6 @@ "thisWeek": "Esta semana", "thisMonth": "This Month", "voiceMessage": "Voice Message", - "dangerousFileType": "For security reasons, this file type cannot be sent", "stagedPreviewThumbnail": "Draft thumbnail link preview for $domain$", "previewThumbnail": "Thumbnail link preview for $domain$", "stagedImageAttachment": "Draft image attachment: $path$", diff --git a/_locales/et/messages.json b/_locales/et/messages.json index 05ddaaa6b..80d9c79b4 100644 --- a/_locales/et/messages.json +++ b/_locales/et/messages.json @@ -60,7 +60,6 @@ "thisWeek": "See nädal", "thisMonth": "See kuu", "voiceMessage": "Häälsõnum", - "dangerousFileType": "Manuse tüüp pole turvakaalutlustel lubatud.", "stagedPreviewThumbnail": "Lingi eelvaate pisipildi mustand: $domain$", "previewThumbnail": "Lingi eelvaate pisipilt: $domain$", "stagedImageAttachment": "Piltmanuse mustand: $path$", diff --git a/_locales/fa/messages.json b/_locales/fa/messages.json index e3edfbac1..c170d9577 100644 --- a/_locales/fa/messages.json +++ b/_locales/fa/messages.json @@ -60,7 +60,6 @@ "thisWeek": "این هفته", "thisMonth": "این ماه", "voiceMessage": "پیام صوتی", - "dangerousFileType": "نوع پیوست به دلایل امنیتی مجاز نیست.", "stagedPreviewThumbnail": "پیش نویس پیوند پیش نمایش پیوند برای $domain$", "previewThumbnail": "پیش نمایش لینک برای $domain$", "stagedImageAttachment": "تصویر پیوست پیش نویس: $path$", diff --git a/_locales/fi/messages.json b/_locales/fi/messages.json index b79cdfce8..2656c6227 100644 --- a/_locales/fi/messages.json +++ b/_locales/fi/messages.json @@ -60,7 +60,6 @@ "thisWeek": "Tämä viikko", "thisMonth": "Tämä kuukausi", "voiceMessage": "Ääniviesti", - "dangerousFileType": "Turvallisuussyistä tätä tiedostotyyppiä ei voida liittää.", "stagedPreviewThumbnail": "Linkin $domain$esikatselukuvan luonnos", "previewThumbnail": "Linkin $domain$ esikatselukuva", "stagedImageAttachment": "Kuvaliitteen $path$ luonnos", diff --git a/_locales/fil/messages.json b/_locales/fil/messages.json index c93e793f8..edf239ee2 100644 --- a/_locales/fil/messages.json +++ b/_locales/fil/messages.json @@ -60,7 +60,6 @@ "thisWeek": "This week", "thisMonth": "This Month", "voiceMessage": "Voice Message", - "dangerousFileType": "For security reasons, this file type cannot be sent", "stagedPreviewThumbnail": "Draft thumbnail link preview for $domain$", "previewThumbnail": "Thumbnail link preview for $domain$", "stagedImageAttachment": "Draft image attachment: $path$", diff --git a/_locales/fr/messages.json b/_locales/fr/messages.json index 8de192285..86fb6a8ae 100644 --- a/_locales/fr/messages.json +++ b/_locales/fr/messages.json @@ -60,7 +60,6 @@ "thisWeek": "Cette semaine", "thisMonth": "Ce mois", "voiceMessage": "Message vocal", - "dangerousFileType": "Le type de fichier joint n’est pas autorisé pour des raisons de sécurité", "stagedPreviewThumbnail": "Brouillon d’imagette d’aperçu de lien pour $domain$", "previewThumbnail": "Imagette d’aperçu de lien pour $domain$", "stagedImageAttachment": "Brouillon d’image jointe : $path$", diff --git a/_locales/he/messages.json b/_locales/he/messages.json index 62bfbf0fd..447608dc3 100644 --- a/_locales/he/messages.json +++ b/_locales/he/messages.json @@ -60,7 +60,6 @@ "thisWeek": "השבוע", "thisMonth": "החודש", "voiceMessage": "הודעה קולית", - "dangerousFileType": "סוג הצרופה אינו מותר מסיבות אבטחה", "stagedPreviewThumbnail": "טיוטה של קדם־תצוגה של קישור עבור $domain$", "previewThumbnail": "קדם־תצוגה של קישור עבור $domain$", "stagedImageAttachment": "טיוטה של צרופת תמונה: $path$", diff --git a/_locales/hi/messages.json b/_locales/hi/messages.json index 4d9b67dbd..b159b47a2 100644 --- a/_locales/hi/messages.json +++ b/_locales/hi/messages.json @@ -60,7 +60,6 @@ "thisWeek": "This Week", "thisMonth": "इस महीने", "voiceMessage": "ध्वनि संदेश", - "dangerousFileType": "Attachment type not allowed for security reasons", "stagedPreviewThumbnail": "Draft thumbnail link preview for $domain$", "previewThumbnail": "Thumbnail link preview for $domain$", "stagedImageAttachment": "Draft image attachment: $path$", diff --git a/_locales/hr/messages.json b/_locales/hr/messages.json index 596b315b6..e952c0a3b 100644 --- a/_locales/hr/messages.json +++ b/_locales/hr/messages.json @@ -60,7 +60,6 @@ "thisWeek": "This Week", "thisMonth": "This Month", "voiceMessage": "Glasovna poruka", - "dangerousFileType": "Attachment type not allowed for security reasons", "stagedPreviewThumbnail": "Draft thumbnail link preview for $domain$", "previewThumbnail": "Thumbnail link preview for $domain$", "stagedImageAttachment": "Draft image attachment: $path$", diff --git a/_locales/hu/messages.json b/_locales/hu/messages.json index abae75c04..5b66c1dde 100644 --- a/_locales/hu/messages.json +++ b/_locales/hu/messages.json @@ -60,7 +60,6 @@ "thisWeek": "Ezen a héten", "thisMonth": "Ebben a hónapban", "voiceMessage": "Hangüzenet", - "dangerousFileType": "A csatolmánytípus biztonsági okokból nincs engedélyezve", "stagedPreviewThumbnail": "A $domain$ hivatkozás előnézeti képének vázlata", "previewThumbnail": "A $domain$ hivatkozás előnézeti képe", "stagedImageAttachment": "Képcsatolmány vázlat: $path$", diff --git a/_locales/id/messages.json b/_locales/id/messages.json index eedbd5f13..d6b7fa444 100644 --- a/_locales/id/messages.json +++ b/_locales/id/messages.json @@ -60,7 +60,6 @@ "thisWeek": "Minggu ini", "thisMonth": "Bulan ini", "voiceMessage": "Pesan Suara", - "dangerousFileType": "Jenis lampiran tidak diperbolehkan untuk alasan keamanan", "stagedPreviewThumbnail": "Draft thumbnail link preview for $domain$", "previewThumbnail": "Thumbnail link preview for $domain$", "stagedImageAttachment": "Draft image attachment: $path$", diff --git a/_locales/it/messages.json b/_locales/it/messages.json index 7305969d3..1b8a0d0a2 100644 --- a/_locales/it/messages.json +++ b/_locales/it/messages.json @@ -60,7 +60,6 @@ "thisWeek": "Questa Settimana", "thisMonth": "Questo Mese", "voiceMessage": "Messaggio vocale", - "dangerousFileType": "Il tipo di allegato non è consentito per ragioni di sicurezza", "stagedPreviewThumbnail": "Miniatura temporanea anteprima link per $domain$", "previewThumbnail": "Miniatura anteprima link per $domain$", "stagedImageAttachment": "Allegato immagine bozza: $path$", diff --git a/_locales/ja/messages.json b/_locales/ja/messages.json index 9a01ad0b5..d0a0de0ff 100644 --- a/_locales/ja/messages.json +++ b/_locales/ja/messages.json @@ -60,7 +60,6 @@ "thisWeek": "今週", "thisMonth": "今月", "voiceMessage": "音声メッセージ", - "dangerousFileType": "セキュリティ上の理由で許可されていない種類の添付ファイルです", "stagedPreviewThumbnail": "$domain$ のサムネイルリンクプレビュー(下書き)", "previewThumbnail": "$domain$ のサムネイルリンクプレビュー", "stagedImageAttachment": "添付画像(下書き): $path$", diff --git a/_locales/ka/messages.json b/_locales/ka/messages.json index 1de57b4b9..8616e6964 100644 --- a/_locales/ka/messages.json +++ b/_locales/ka/messages.json @@ -60,7 +60,6 @@ "thisWeek": "ამ კვირაში", "thisMonth": "ამ თვეს", "voiceMessage": "ხმოვანი შეტყობინება", - "dangerousFileType": "უსაფრთხოების მიზნით, ამ ტიპის ფაილის გაგზავნა შეუძლებელია", "stagedPreviewThumbnail": "Draft thumbnail link preview for $domain$", "previewThumbnail": "Thumbnail link preview for $domain$", "stagedImageAttachment": "Draft image attachment: $path$", diff --git a/_locales/km/messages.json b/_locales/km/messages.json index be6f29881..d1669c2d3 100644 --- a/_locales/km/messages.json +++ b/_locales/km/messages.json @@ -60,7 +60,6 @@ "thisWeek": "សប្តាហ៍នេះ", "thisMonth": "ខែនេះ", "voiceMessage": "សារសំឡេង", - "dangerousFileType": "ប្រភេទឯកសារភ្ជាប់មិនអនុញ្ញាតសម្រាប់ហេតុផលសុវត្ថិភាព", "stagedPreviewThumbnail": "ការមើលតំណជារូបភាពតូចៗព្រាងសម្រាប់ $domain$", "previewThumbnail": "ការមើលតំណជារូបភាពតូចៗសម្រាប់$domain$", "stagedImageAttachment": "រូបភាពឯកសារភ្ជាប់ព្រាង៖ $path$", diff --git a/_locales/kn/messages.json b/_locales/kn/messages.json index c93e793f8..edf239ee2 100644 --- a/_locales/kn/messages.json +++ b/_locales/kn/messages.json @@ -60,7 +60,6 @@ "thisWeek": "This week", "thisMonth": "This Month", "voiceMessage": "Voice Message", - "dangerousFileType": "For security reasons, this file type cannot be sent", "stagedPreviewThumbnail": "Draft thumbnail link preview for $domain$", "previewThumbnail": "Thumbnail link preview for $domain$", "stagedImageAttachment": "Draft image attachment: $path$", diff --git a/_locales/ko/messages.json b/_locales/ko/messages.json index a05151a7d..c2dab1f4a 100644 --- a/_locales/ko/messages.json +++ b/_locales/ko/messages.json @@ -60,7 +60,6 @@ "thisWeek": "This Week", "thisMonth": "이번 달", "voiceMessage": "보이스 메시지", - "dangerousFileType": "Attachment type not allowed for security reasons", "stagedPreviewThumbnail": "Draft thumbnail link preview for $domain$", "previewThumbnail": "Thumbnail link preview for $domain$", "stagedImageAttachment": "Draft image attachment: $path$", diff --git a/_locales/lt/messages.json b/_locales/lt/messages.json index c6609a9ae..ada407d6f 100644 --- a/_locales/lt/messages.json +++ b/_locales/lt/messages.json @@ -60,7 +60,6 @@ "thisWeek": "Šią savaitę", "thisMonth": "Šį mėnesį", "voiceMessage": "Balso žinutė", - "dangerousFileType": "Šis priedo tipas saugumo sumetimais yra neleidžiamas", "stagedPreviewThumbnail": "Juodraštinė miniatiūrinė nuorodos peržiūra, skirta $domain$", "previewThumbnail": "Miniatiūrinė nuorodos peržiūra, skirta $domain$", "stagedImageAttachment": "Juodraštinis paveikslo priedas: $path$", diff --git a/_locales/mk/messages.json b/_locales/mk/messages.json index d67e5eb48..b6689a2df 100644 --- a/_locales/mk/messages.json +++ b/_locales/mk/messages.json @@ -60,7 +60,6 @@ "thisWeek": "This Week", "thisMonth": "This Month", "voiceMessage": "Voice Message", - "dangerousFileType": "Attachment type not allowed for security reasons", "stagedPreviewThumbnail": "Draft thumbnail link preview for $domain$", "previewThumbnail": "Thumbnail link preview for $domain$", "stagedImageAttachment": "Draft image attachment: $path$", diff --git a/_locales/nb/messages.json b/_locales/nb/messages.json index c93e793f8..edf239ee2 100644 --- a/_locales/nb/messages.json +++ b/_locales/nb/messages.json @@ -60,7 +60,6 @@ "thisWeek": "This week", "thisMonth": "This Month", "voiceMessage": "Voice Message", - "dangerousFileType": "For security reasons, this file type cannot be sent", "stagedPreviewThumbnail": "Draft thumbnail link preview for $domain$", "previewThumbnail": "Thumbnail link preview for $domain$", "stagedImageAttachment": "Draft image attachment: $path$", diff --git a/_locales/nl/messages.json b/_locales/nl/messages.json index a9e26c97b..a7a8c6a93 100644 --- a/_locales/nl/messages.json +++ b/_locales/nl/messages.json @@ -60,7 +60,6 @@ "thisWeek": "Deze week", "thisMonth": "Deze maand", "voiceMessage": "Audiobericht", - "dangerousFileType": "Type bijlage niet toegestaan wegens veiligheidsredenen", "stagedPreviewThumbnail": "Conceptvoorbeeldweergave voor $domain$", "previewThumbnail": "Voorbeeldweergave voor $domain$", "stagedImageAttachment": "Concept voor afbeeldingsbijlage: $path$", diff --git a/_locales/no/messages.json b/_locales/no/messages.json index e84e2e2f8..ee88ff1be 100644 --- a/_locales/no/messages.json +++ b/_locales/no/messages.json @@ -60,7 +60,6 @@ "thisWeek": "Denne uken", "thisMonth": "Denne måneden", "voiceMessage": "Talebeskjed", - "dangerousFileType": "Av sikkerhetsårsaker kan denne filtypen ikke sendes", "stagedPreviewThumbnail": "Miniatyrlenkeforhåndsvisningskladd for $domain$", "previewThumbnail": "Miniatyrlenkeforhåndsvisning for $domain$", "stagedImageAttachment": "Bildevedleggskladd: $path$", diff --git a/_locales/pa/messages.json b/_locales/pa/messages.json index c93e793f8..edf239ee2 100644 --- a/_locales/pa/messages.json +++ b/_locales/pa/messages.json @@ -60,7 +60,6 @@ "thisWeek": "This week", "thisMonth": "This Month", "voiceMessage": "Voice Message", - "dangerousFileType": "For security reasons, this file type cannot be sent", "stagedPreviewThumbnail": "Draft thumbnail link preview for $domain$", "previewThumbnail": "Thumbnail link preview for $domain$", "stagedImageAttachment": "Draft image attachment: $path$", diff --git a/_locales/pl/messages.json b/_locales/pl/messages.json index 1ac4f7a9d..cf568d62a 100644 --- a/_locales/pl/messages.json +++ b/_locales/pl/messages.json @@ -60,7 +60,6 @@ "thisWeek": "W tym tygodniu", "thisMonth": "W tym miesiącu", "voiceMessage": "Wiadomość głosowa", - "dangerousFileType": "Ze względów bezpieczeństwa ten typ załącznika nie jest dozwolony", "stagedPreviewThumbnail": "Projekt miniaturki podglądu linku do $domain$", "previewThumbnail": "Podgląd miniaturki linku dla $domain$", "stagedImageAttachment": "Projekt załącznika obrazu: $path$", diff --git a/_locales/pt_BR/messages.json b/_locales/pt_BR/messages.json index d8030535a..873b61197 100644 --- a/_locales/pt_BR/messages.json +++ b/_locales/pt_BR/messages.json @@ -60,7 +60,6 @@ "thisWeek": "Esta Semana", "thisMonth": "Este Mês", "voiceMessage": "Mensagem de Voz", - "dangerousFileType": "Tipo de anexo não permitido por motivos de segurança", "stagedPreviewThumbnail": "Pré-visualização em miniatura do link $domain$ (rascunho)", "previewThumbnail": "Pré-visualização em miniatura do link $domain$", "stagedImageAttachment": "Rascunho de imagem anexa: $path$", diff --git a/_locales/pt_PT/messages.json b/_locales/pt_PT/messages.json index b4696fd47..58dca70bb 100644 --- a/_locales/pt_PT/messages.json +++ b/_locales/pt_PT/messages.json @@ -60,7 +60,6 @@ "thisWeek": "Esta semana", "thisMonth": "Este mês", "voiceMessage": "Mensagem de voz", - "dangerousFileType": "O tipo de ficheiro deste anexo não é permitido por razões de segurança", "stagedPreviewThumbnail": "Pré-visualização da hiperligação da miniatura do esboço $domain$", "previewThumbnail": "Pré-visualização da hiperligação da miniatura $domain$", "stagedImageAttachment": "Esboço do anexo de imagem: $path$", diff --git a/_locales/ro/messages.json b/_locales/ro/messages.json index f134e7421..130a4beb4 100644 --- a/_locales/ro/messages.json +++ b/_locales/ro/messages.json @@ -60,7 +60,6 @@ "thisWeek": "Saptamana asta", "thisMonth": "Luna asta", "voiceMessage": "Mesaj vocal", - "dangerousFileType": "Tipul de atașament nu este permis din motive de securitate", "stagedPreviewThumbnail": "Previzualizare link miniatură pentru $domain$", "previewThumbnail": "Previzualizare link miniatură pentru $domain$", "stagedImageAttachment": "Atașament imagine ciornă: $path$", diff --git a/_locales/ru/messages.json b/_locales/ru/messages.json index c14859fca..ca45bdae4 100644 --- a/_locales/ru/messages.json +++ b/_locales/ru/messages.json @@ -60,7 +60,6 @@ "thisWeek": "На этой неделе", "thisMonth": "В этом месяце", "voiceMessage": "Голосовое сообщение", - "dangerousFileType": "Данный тип файлов невозможно переслать из соображений безопасности", "stagedPreviewThumbnail": "Черновик миниатюры предварительного просмотра ссылки для $domain$", "previewThumbnail": "Миниатюра предварительного просмотра ссылки для $domain$", "stagedImageAttachment": "Черновик прикрепленного изображения: $path$", diff --git a/_locales/si/messages.json b/_locales/si/messages.json index 5c7b016aa..51027ff15 100644 --- a/_locales/si/messages.json +++ b/_locales/si/messages.json @@ -60,7 +60,6 @@ "thisWeek": "මෙම සතිය", "thisMonth": "මෙම මාසය", "voiceMessage": "හඬ පණිවිඩය", - "dangerousFileType": "ආරක්‍ෂක හේතූන් මත මෙම ගොනු වර්ගය යැවීමට නොහැකිය", "stagedPreviewThumbnail": "Draft thumbnail link preview for $domain$", "previewThumbnail": "Thumbnail link preview for $domain$", "stagedImageAttachment": "Draft image attachment: $path$", diff --git a/_locales/sk/messages.json b/_locales/sk/messages.json index 698420ce8..de6033509 100644 --- a/_locales/sk/messages.json +++ b/_locales/sk/messages.json @@ -60,7 +60,6 @@ "thisWeek": "Tento týždeň", "thisMonth": "Tento mesiac", "voiceMessage": "Hlasová Správa", - "dangerousFileType": "Tento typ súboru je z bezpečnostných dôvodov zakázaný", "stagedPreviewThumbnail": "Návrh náhľadu odkazu pre $domain$", "previewThumbnail": "Náhľad odkazu pre $domain$", "stagedImageAttachment": "Návrh obrázkovej prílohy: $path$", diff --git a/_locales/sl/messages.json b/_locales/sl/messages.json index c84af8e6b..239dc37ca 100644 --- a/_locales/sl/messages.json +++ b/_locales/sl/messages.json @@ -60,7 +60,6 @@ "thisWeek": "Ta teden", "thisMonth": "Ta mesec", "voiceMessage": "Glasovno sporočilo", - "dangerousFileType": "Ta vrsta priponke iz varnostnih razlogov ni dovoljena", "stagedPreviewThumbnail": "Osnutek predogledne sličice povezave na: $domain$", "previewThumbnail": "Predogledna sličica povezave na: $domain$", "stagedImageAttachment": "Osnutek slikovne priponke: $path$", diff --git a/_locales/sq/messages.json b/_locales/sq/messages.json index 714681cef..b6a25372f 100644 --- a/_locales/sq/messages.json +++ b/_locales/sq/messages.json @@ -60,7 +60,6 @@ "thisWeek": "Këtë Javë", "thisMonth": "Këtë Muaj", "voiceMessage": "Mesazh Zanor", - "dangerousFileType": "Lloj bashkëngjitjeje i palejuar për arsye sigurie", "stagedPreviewThumbnail": "Paraparje lidhjeje miniature skice për $domain$", "previewThumbnail": "Paraparje lidhjeje miniature për $domain$", "stagedImageAttachment": "Bashkëngjitje figure skice: $path$", diff --git a/_locales/sr/messages.json b/_locales/sr/messages.json index 7b1db81de..689f20965 100644 --- a/_locales/sr/messages.json +++ b/_locales/sr/messages.json @@ -60,7 +60,6 @@ "thisWeek": "Ova nedelja", "thisMonth": "Ovog meseca", "voiceMessage": "Гласовна порука", - "dangerousFileType": "Attachment type not allowed for security reasons", "stagedPreviewThumbnail": "Pregled nacrta linka za $domain$", "previewThumbnail": "Pregled linka za $domain$", "stagedImageAttachment": "Nacrt priloga fotografje: $path$", diff --git a/_locales/sv/messages.json b/_locales/sv/messages.json index c05e80a08..8ba51b3b4 100644 --- a/_locales/sv/messages.json +++ b/_locales/sv/messages.json @@ -60,7 +60,6 @@ "thisWeek": "Denna vecka", "thisMonth": "Denna månad", "voiceMessage": "Röstmeddelande", - "dangerousFileType": "Bilagor av denna typ tillåts inte på grund av säkerhetsskäl", "stagedPreviewThumbnail": "Utkast av länkförhandsvisning i miniatyrbild för $domain$", "previewThumbnail": "Länkförhandsvisning i miniatyrbild för $domain$", "stagedImageAttachment": "Utkast till bildbilaga: $path$", diff --git a/_locales/ta/messages.json b/_locales/ta/messages.json index 377262203..bd6557f07 100644 --- a/_locales/ta/messages.json +++ b/_locales/ta/messages.json @@ -60,7 +60,6 @@ "thisWeek": "This week", "thisMonth": "This Month", "voiceMessage": "Voice Message", - "dangerousFileType": "For security reasons, this file type cannot be sent", "stagedPreviewThumbnail": "Draft thumbnail link preview for $domain$", "previewThumbnail": "Thumbnail link preview for $domain$", "stagedImageAttachment": "Draft image attachment: $path$", diff --git a/_locales/th/messages.json b/_locales/th/messages.json index d0de0e42b..5342fd8a4 100644 --- a/_locales/th/messages.json +++ b/_locales/th/messages.json @@ -60,7 +60,6 @@ "thisWeek": "สัปดาห์นี้", "thisMonth": "เดือนนี้", "voiceMessage": "ข้อความเสียง", - "dangerousFileType": "Attachment type not allowed for security reasons", "stagedPreviewThumbnail": "Draft thumbnail link preview for $domain$", "previewThumbnail": "Thumbnail link preview for $domain$", "stagedImageAttachment": "Draft image attachment: $path$", diff --git a/_locales/tr/messages.json b/_locales/tr/messages.json index 77bbd603b..4110622ce 100644 --- a/_locales/tr/messages.json +++ b/_locales/tr/messages.json @@ -60,7 +60,6 @@ "thisWeek": "Bu Hafta", "thisMonth": "Bu Ay", "voiceMessage": "Sesli İleti", - "dangerousFileType": "Eklenti türüne güvenlik sebeplerinden dolayı izin verilmemektedir", "stagedPreviewThumbnail": "$domain$ için bağlantı ön izlemesi küçük resim taslağı", "previewThumbnail": "$domain$ için bağlantı ön izlemesi küçük resmi", "stagedImageAttachment": "Resim eklentisi taslağı: $path$", diff --git a/_locales/uk/messages.json b/_locales/uk/messages.json index f34e41062..e109038f2 100644 --- a/_locales/uk/messages.json +++ b/_locales/uk/messages.json @@ -60,7 +60,6 @@ "thisWeek": "This Week", "thisMonth": "Цей місяць", "voiceMessage": "Голосове повідомлення", - "dangerousFileType": "Attachment type not allowed for security reasons", "stagedPreviewThumbnail": "Попередній перегляд ескізу посилання для $domain$", "previewThumbnail": "Попередній перегляд посилання для $domain$", "stagedImageAttachment": "Ескіз прикріпленого зображення: $path$", diff --git a/_locales/uz/messages.json b/_locales/uz/messages.json index d31996224..24751ecd1 100644 --- a/_locales/uz/messages.json +++ b/_locales/uz/messages.json @@ -60,7 +60,6 @@ "thisWeek": "This week", "thisMonth": "This Month", "voiceMessage": "Voice Message", - "dangerousFileType": "For security reasons, this file type cannot be sent", "stagedPreviewThumbnail": "Draft thumbnail link preview for $domain$", "previewThumbnail": "Thumbnail link preview for $domain$", "stagedImageAttachment": "Draft image attachment: $path$", diff --git a/_locales/vi/messages.json b/_locales/vi/messages.json index dbdc2a6f8..58e019f60 100644 --- a/_locales/vi/messages.json +++ b/_locales/vi/messages.json @@ -60,7 +60,6 @@ "thisWeek": "Tuần này", "thisMonth": "Tháng này", "voiceMessage": "Tin nhắn thoại", - "dangerousFileType": "Attachment type not allowed for security reasons", "stagedPreviewThumbnail": "Draft thumbnail link preview for $domain$", "previewThumbnail": "Thumbnail link preview for $domain$", "stagedImageAttachment": "Draft image attachment: $path$", diff --git a/_locales/zh_CN/messages.json b/_locales/zh_CN/messages.json index e729e0f37..2c7a16c59 100644 --- a/_locales/zh_CN/messages.json +++ b/_locales/zh_CN/messages.json @@ -60,7 +60,6 @@ "thisWeek": "本周", "thisMonth": "本月", "voiceMessage": "语音消息", - "dangerousFileType": "为了安全,不允许此附件类型", "stagedPreviewThumbnail": "待发送的$domain$链接预览", "previewThumbnail": "$domain$的链接预览缩略图", "stagedImageAttachment": "待发送的图片附件:$path$", diff --git a/_locales/zh_TW/messages.json b/_locales/zh_TW/messages.json index fded69c93..35bafd8ff 100644 --- a/_locales/zh_TW/messages.json +++ b/_locales/zh_TW/messages.json @@ -60,7 +60,6 @@ "thisWeek": "本週", "thisMonth": "本月", "voiceMessage": "語音訊息", - "dangerousFileType": "因安全考量無法傳送此類附件\n", "stagedPreviewThumbnail": "$domain$ 的草稿縮圖連結預覽", "previewThumbnail": "$domain$ 的縮圖連結預覽", "stagedImageAttachment": "草稿圖片附檔: $path$", diff --git a/stylesheets/_modules.scss b/stylesheets/_modules.scss index 52f1e3560..5c61e37fc 100644 --- a/stylesheets/_modules.scss +++ b/stylesheets/_modules.scss @@ -87,26 +87,6 @@ align-items: center; } -.module-message__generic-attachment__icon-dangerous-container { - position: absolute; - - top: -1px; - right: -4px; - - height: 16px; - width: 16px; - - border-radius: 50%; - background-color: $color-white; -} - -.module-message__generic-attachment__icon-dangerous { - height: 16px; - width: 16px; - - @include color-svg('../images/error-filled.svg', $session-color-danger); -} - .module-message__generic-attachment__icon__extension { font-size: 10px; line-height: 13px; diff --git a/ts/components/conversation/SessionConversation.tsx b/ts/components/conversation/SessionConversation.tsx index 5b74f8674..4a2b3d4c1 100644 --- a/ts/components/conversation/SessionConversation.tsx +++ b/ts/components/conversation/SessionConversation.tsx @@ -337,11 +337,6 @@ export class SessionConversation extends React.Component { const { stagedAttachments } = this.props; - if (window.Signal.Util.isFileDangerous(fileName)) { - ToastUtils.pushDangerousFileError(); - return; - } - if (stagedAttachments.length >= 32) { ToastUtils.pushMaximumAttachmentsError(); return; diff --git a/ts/components/conversation/message/message-content/MessageAttachment.tsx b/ts/components/conversation/message/message-content/MessageAttachment.tsx index 4e485d8d3..3cae90259 100644 --- a/ts/components/conversation/message/message-content/MessageAttachment.tsx +++ b/ts/components/conversation/message/message-content/MessageAttachment.tsx @@ -24,7 +24,6 @@ import { isImage, isVideo, } from '../../../../types/Attachment'; -import { isFileDangerous } from '../../../../util'; import { saveAttachmentToDisk } from '../../../../util/attachmentsUtil'; import { Spinner } from '../../../basic/Spinner'; import { AudioPlayerWithEncryptedFile } from '../../H5AudioPlayer'; @@ -149,7 +148,6 @@ export const MessageAttachment = (props: Props) => { } else { const { pending, fileName, fileSize, contentType } = firstAttachment; const extension = getExtensionForDisplay({ contentType, fileName }); - const isDangerous = isFileDangerous(fileName || ''); return (
@@ -170,11 +168,6 @@ export const MessageAttachment = (props: Props) => {
) : null} - {isDangerous ? ( -
-
-
- ) : null}
)}
diff --git a/ts/session/utils/Toast.tsx b/ts/session/utils/Toast.tsx index 28d3e5395..f961811bd 100644 --- a/ts/session/utils/Toast.tsx +++ b/ts/session/utils/Toast.tsx @@ -63,10 +63,6 @@ export function pushLoadAttachmentFailure(message?: string) { } } -export function pushDangerousFileError() { - pushToastError('dangerousFileType', window.i18n('dangerousFileType')); -} - export function pushFileSizeError(limit: number, units: string) { pushToastError('fileSizeWarning', window.i18n('fileSizeWarning'), `Max size: ${limit} ${units}`); } diff --git a/ts/test/util/isFileDangerous_test.ts b/ts/test/util/isFileDangerous_test.ts deleted file mode 100644 index 3c6097e3c..000000000 --- a/ts/test/util/isFileDangerous_test.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { assert } from 'chai'; - -import { isFileDangerous } from '../../util/isFileDangerous'; - -describe('isFileDangerous', () => { - it('returns false for images', () => { - assert.strictEqual(isFileDangerous('dog.gif'), false); - assert.strictEqual(isFileDangerous('cat.jpg'), false); - }); - - it('returns false for documents', () => { - assert.strictEqual(isFileDangerous('resume.docx'), false); - assert.strictEqual(isFileDangerous('price_list.pdf'), false); - }); - - it('returns true for executable files', () => { - assert.strictEqual(isFileDangerous('run.exe'), true); - assert.strictEqual(isFileDangerous('install.pif'), true); - }); - - it('returns false for empty filename', () => { - assert.strictEqual(isFileDangerous(''), false); - }); - - it('returns false for exe at various parts of filename', () => { - assert.strictEqual(isFileDangerous('.exemanifesto.txt'), false); - assert.strictEqual(isFileDangerous('runexe'), false); - assert.strictEqual(isFileDangerous('run_exe'), false); - }); - - it('returns true for upper-case EXE', () => { - assert.strictEqual(isFileDangerous('run.EXE'), true); - }); -}); diff --git a/ts/types/LocalizerKeys.ts b/ts/types/LocalizerKeys.ts index 0f7d9798e..ecb234e34 100644 --- a/ts/types/LocalizerKeys.ts +++ b/ts/types/LocalizerKeys.ts @@ -390,7 +390,6 @@ export type LocalizerKeys = | 'timerOption_30_seconds' | 'createAccount' | 'timerOption_1_minute_abbreviated' - | 'dangerousFileType' | 'timerOption_12_hours' | 'unblockToSend' | 'timerOption_1_minute' diff --git a/ts/util/index.ts b/ts/util/index.ts index e70796d58..ffe85ee48 100644 --- a/ts/util/index.ts +++ b/ts/util/index.ts @@ -1,6 +1,5 @@ import * as GoogleChrome from './GoogleChrome'; import { arrayBufferToObjectURL } from './arrayBufferToObjectURL'; -import { isFileDangerous } from './isFileDangerous'; import { missingCaseError } from './missingCaseError'; import { makeLookup } from './makeLookup'; import * as PasswordUtil from './passwordUtils'; @@ -12,7 +11,6 @@ export * from './blockedNumberController'; export { arrayBufferToObjectURL, GoogleChrome, - isFileDangerous, makeLookup, missingCaseError, PasswordUtil, diff --git a/ts/util/isFileDangerous.ts b/ts/util/isFileDangerous.ts deleted file mode 100644 index 2d39baa1c..000000000 --- a/ts/util/isFileDangerous.ts +++ /dev/null @@ -1,6 +0,0 @@ -// tslint:disable-next-line max-line-length -const DANGEROUS_FILE_TYPES = /\.(ADE|ADP|APK|BAT|CHM|CMD|COM|CPL|DLL|DMG|EXE|HTA|INS|ISP|JAR|JS|JSE|LIB|LNK|MDE|MSC|MSI|MSP|MST|NSH|PIF|SCR|SCT|SHB|SYS|VB|VBE|VBS|VXD|WSC|WSF|WSH|CAB)$/i; - -export function isFileDangerous(fileName: string): boolean { - return DANGEROUS_FILE_TYPES.test(fileName); -}