diff --git a/Configs/Release.xcconfig b/Configs/Release.xcconfig index 4084b5a0..e764b94a 100644 --- a/Configs/Release.xcconfig +++ b/Configs/Release.xcconfig @@ -1,4 +1,4 @@ -MARKETING_VERSION = 1.8.0 +MARKETING_VERSION = 1.8.1 CURRENT_PROJECT_VERSION = 1 IPHONEOS_DEPLOYMENT_TARGET = 16.0 diff --git a/PRIVACY_POLICY.md b/PRIVACY_POLICY.md index 74285c0b..664c18c6 100644 --- a/PRIVACY_POLICY.md +++ b/PRIVACY_POLICY.md @@ -1,6 +1,6 @@ # bitchat Privacy Policy -*Last updated: July 2026* +*Last updated: November 2026* ## Our Commitment @@ -81,7 +81,7 @@ Internet-backed features are optional. When enabled or used: Nostr relays are operated by third parties. Their retention, logging, availability, and privacy practices are outside the project's control. Public events and encrypted events may remain on relays according to each relay's policy. -You can add relays yourself in settings, including `.onion` addresses. Added relays are stored locally, are limited in number, and are erased by panic wipe. Tor routing is on by default; while it is off, every relay you connect to can see your IP address, including relays carrying your private messages. +You can add custom `wss://` relays yourself in settings. Added relays are stored locally, are limited in number, and are erased by panic wipe. Tor routing is on by default; while it is off, every relay you connect to can see your IP address, including relays carrying your private messages. ## Location and Apple Services @@ -96,7 +96,7 @@ Location permission is optional and requested as when-in-use access. It is used - Microphone access is used only while you record a voice note or actively hold live push-to-talk. The resulting audio is sent to the mesh conversation you selected; public-conversation audio is public to that mesh, while private-conversation audio uses the private transport protections described below. - Voice-note and live-audio files can remain in Application Support under the media retention rules above. -- Camera access is used to scan peer-verification QR codes. Photo-library access is used when you choose an image to send. +- Camera access is used to scan peer-verification QR codes and when you take a photo to share in a mesh chat. Photo-library access is used when you choose an image to send. - These permissions can be revoked in system settings. bitchat does not record microphone or camera input while the related capture UI is inactive. ## Cryptography diff --git a/Package.swift b/Package.swift index f5e5146f..c3aef265 100644 --- a/Package.swift +++ b/Package.swift @@ -33,6 +33,7 @@ let package = Package( path: "bitchat", exclude: [ "Info.plist", + "PrivacyInfo.xcprivacy", "Assets.xcassets", "_PreviewHelpers/PreviewAssets.xcassets", "bitchat.entitlements", diff --git a/bitchat.xcodeproj/project.pbxproj b/bitchat.xcodeproj/project.pbxproj index cadd07b5..23bd88d6 100644 --- a/bitchat.xcodeproj/project.pbxproj +++ b/bitchat.xcodeproj/project.pbxproj @@ -61,7 +61,6 @@ 61F92EBA29C47C0FCC482F1F /* bitchatShareExtension.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = bitchatShareExtension.appex; sourceTree = BUILT_PRODUCTS_DIR; }; 8F3A7C058C2C8E1A06C8CF8B /* bitchat.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = bitchat.app; sourceTree = BUILT_PRODUCTS_DIR; }; 96D0D41CA19EE5A772AA8434 /* bitchat.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = bitchat.app; sourceTree = BUILT_PRODUCTS_DIR; }; - A6F183FC2E948783006A9046 /* tor-nolzma.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = "tor-nolzma.xcframework"; path = "localPackages/Tor/Frameworks/tor-nolzma.xcframework"; sourceTree = ""; }; C0DB1DE27F0AAB5092663E8E /* bitchatTests_iOS.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = bitchatTests_iOS.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; E0A1B2C3D4E5F6012345678A /* relays/online_relays_gps.csv */ = {isa = PBXFileReference; lastKnownFileType = text; path = relays/online_relays_gps.csv; sourceTree = ""; }; /* End PBXFileReference section */ @@ -202,7 +201,6 @@ A6F183FB2E948783006A9046 /* Frameworks */ = { isa = PBXGroup; children = ( - A6F183FC2E948783006A9046 /* tor-nolzma.xcframework */, ); name = Frameworks; sourceTree = ""; diff --git a/bitchat/Info.plist b/bitchat/Info.plist index 57ddfa11..7e1a31f5 100644 --- a/bitchat/Info.plist +++ b/bitchat/Info.plist @@ -40,7 +40,7 @@ NSBluetoothPeripheralUsageDescription bitchat uses Bluetooth to discover and connect with other bitchat users nearby. NSCameraUsageDescription - bitchat uses the camera to scan QR codes to verify peers. + bitchat uses the camera to scan QR codes to verify peers and to take photos to share in mesh chats. NSLocationWhenInUseUsageDescription bitchat uses your location to compute optional geohash channels, bridge cells, and nearby place labels. Exact coordinates are not included in bitchat messages. NSMicrophoneUsageDescription diff --git a/bitchat/Localizable.xcstrings b/bitchat/Localizable.xcstrings index 47e67a51..411405bf 100644 --- a/bitchat/Localizable.xcstrings +++ b/bitchat/Localizable.xcstrings @@ -3170,181 +3170,181 @@ "ar" : { "stringUnit" : { "state" : "translated", - "value" : "عندما لا تصل شبكة mesh إلى شخص، تنتقل الرسائل الخاصة عبر هذه المرحّلات. المرحّلات المدمجة عناوين معروفة يمكن لمرشّح الشبكة حجبها — لذا يمكنك إضافة مرحّلاتك الخاصة، بما في ذلك عناوين .onion." + "value" : "عندما لا تصل شبكة mesh إلى شخص، تنتقل الرسائل الخاصة عبر هذه المرحّلات. المرحّلات المدمجة عناوين معروفة يمكن لمرشّح الشبكة حجبها — لذا يمكنك إضافة مرحّلاتك الخاصة." } }, "bn" : { "stringUnit" : { "state" : "translated", - "value" : "মেশ কারও কাছে পৌঁছাতে না পারলে ব্যক্তিগত বার্তা এই রিলেগুলোর মধ্য দিয়ে যায়। বিল্ট-ইন রিলেগুলো সুপরিচিত ঠিকানা, যা নেটওয়ার্ক ফিল্টার আটকে দিতে পারে — তাই আপনি নিজের রিলে যোগ করতে পারেন, .onion ঠিকানাও।" + "value" : "মেশ কারও কাছে পৌঁছাতে না পারলে ব্যক্তিগত বার্তা এই রিলেগুলোর মধ্য দিয়ে যায়। বিল্ট-ইন রিলেগুলো সুপরিচিত ঠিকানা, যা নেটওয়ার্ক ফিল্টার আটকে দিতে পারে — তাই আপনি নিজের রিলে যোগ করতে পারেন।" } }, "de" : { "stringUnit" : { "state" : "translated", - "value" : "wenn das mesh jemanden nicht erreicht, laufen private nachrichten über diese relays. die eingebauten sind bekannte adressen, die ein netzwerkfilter blockieren kann — du kannst also eigene hinzufügen, auch .onion-adressen." + "value" : "wenn das mesh jemanden nicht erreicht, laufen private nachrichten über diese relays. die eingebauten sind bekannte adressen, die ein netzwerkfilter blockieren kann — du kannst also eigene hinzufügen." } }, "en" : { "stringUnit" : { "state" : "translated", - "value" : "when the mesh can't reach someone, private messages travel through these relays. the built-in ones are well-known addresses that a network filter can block, so you can add your own — including .onion addresses." + "value" : "when the mesh can't reach someone, private messages travel through these relays. the built-in ones are well-known addresses that a network filter can block, so you can add your own." } }, "es" : { "stringUnit" : { "state" : "translated", - "value" : "cuando el mesh no llega a alguien, los mensajes privados viajan por estos relays. los integrados son direcciones muy conocidas que un filtro de red puede bloquear, así que puedes añadir los tuyos — incluidas direcciones .onion." + "value" : "cuando el mesh no llega a alguien, los mensajes privados viajan por estos relays. los integrados son direcciones muy conocidas que un filtro de red puede bloquear, así que puedes añadir los tuyos." } }, "fa" : { "stringUnit" : { "state" : "translated", - "value" : "وقتی مش به کسی نمی‌رسد، پیام‌های خصوصی از این رله‌ها می‌گذرند. رله‌های داخلی نشانی‌های شناخته‌شده‌ای هستند که یک صافی شبکه می‌تواند مسدودشان کند — پس می‌توانید رله‌های خودتان را اضافه کنید، از جمله نشانی‌های .onion." + "value" : "وقتی مش به کسی نمی‌رسد، پیام‌های خصوصی از این رله‌ها می‌گذرند. رله‌های داخلی نشانی‌های شناخته‌شده‌ای هستند که یک صافی شبکه می‌تواند مسدودشان کند — پس می‌توانید رله‌های خودتان را اضافه کنید." } }, "fil" : { "stringUnit" : { "state" : "translated", - "value" : "kapag hindi maabot ng mesh ang isang tao, dumadaan ang mga pribadong mensahe sa mga relay na ito. ang mga built-in ay kilalang-kilalang address na kayang harangin ng filter ng network — kaya maaari kang magdagdag ng sarili mo, kasama ang mga .onion address." + "value" : "kapag hindi maabot ng mesh ang isang tao, dumadaan ang mga pribadong mensahe sa mga relay na ito. ang mga built-in ay kilalang-kilalang address na kayang harangin ng filter ng network — kaya maaari kang magdagdag ng sarili mo." } }, "fr" : { "stringUnit" : { "state" : "translated", - "value" : "quand le mesh ne joint pas quelqu'un, les messages privés passent par ces relais. ceux intégrés sont des adresses bien connues qu'un filtre réseau peut bloquer — tu peux donc ajouter les tiens, y compris des adresses .onion." + "value" : "quand le mesh ne joint pas quelqu'un, les messages privés passent par ces relais. ceux intégrés sont des adresses bien connues qu'un filtre réseau peut bloquer — tu peux donc ajouter les tiens." } }, "he" : { "stringUnit" : { "state" : "translated", - "value" : "כשה-mesh לא מגיע למישהו, הודעות פרטיות עוברות דרך הממסרים האלה. הממסרים המובנים הם כתובות מוכרות שמסנן רשת יכול לחסום — אפשר להוסיף ממסרים משלך, כולל כתובות .onion." + "value" : "כשה-mesh לא מגיע למישהו, הודעות פרטיות עוברות דרך הממסרים האלה. הממסרים המובנים הם כתובות מוכרות שמסנן רשת יכול לחסום — אפשר להוסיף ממסרים משלך." } }, "hi" : { "stringUnit" : { "state" : "translated", - "value" : "जब मेश किसी तक नहीं पहुँच पाता, तब निजी संदेश इन रिले से होकर जाते हैं। अंतर्निर्मित रिले जाने-पहचाने पते हैं जिन्हें नेटवर्क फ़िल्टर रोक सकता है — इसलिए आप अपने रिले जोड़ सकते हैं, .onion पते भी।" + "value" : "जब मेश किसी तक नहीं पहुँच पाता, तब निजी संदेश इन रिले से होकर जाते हैं। अंतर्निर्मित रिले जाने-पहचाने पते हैं जिन्हें नेटवर्क फ़िल्टर रोक सकता है — इसलिए आप अपने रिले जोड़ सकते हैं।" } }, "id" : { "stringUnit" : { "state" : "translated", - "value" : "saat mesh tidak bisa menjangkau seseorang, pesan pribadi lewat relay ini. relay bawaan adalah alamat yang sudah dikenal luas dan bisa diblokir filter jaringan — jadi kamu bisa menambahkan relay sendiri, termasuk alamat .onion." + "value" : "saat mesh tidak bisa menjangkau seseorang, pesan pribadi lewat relay ini. relay bawaan adalah alamat yang sudah dikenal luas dan bisa diblokir filter jaringan — jadi kamu bisa menambahkan relay sendiri." } }, "it" : { "stringUnit" : { "state" : "translated", - "value" : "quando la mesh non raggiunge qualcuno, i messaggi privati passano da questi relay. quelli integrati sono indirizzi molto noti che un filtro di rete può bloccare — puoi quindi aggiungere i tuoi, anche indirizzi .onion." + "value" : "quando la mesh non raggiunge qualcuno, i messaggi privati passano da questi relay. quelli integrati sono indirizzi molto noti che un filtro di rete può bloccare — puoi quindi aggiungere i tuoi." } }, "ja" : { "stringUnit" : { "state" : "translated", - "value" : "meshで相手に届かないとき、プライベートメッセージはこれらのリレーを通ります。組み込みのリレーはよく知られたアドレスで、ネットワークのフィルターにブロックされることがあります — 自分のリレー、.onionアドレスも追加できます。" + "value" : "meshで相手に届かないとき、プライベートメッセージはこれらのリレーを通ります。組み込みのリレーはよく知られたアドレスで、ネットワークのフィルターにブロックされることがあります — 自分のリレーを追加できます。" } }, "ko" : { "stringUnit" : { "state" : "translated", - "value" : "mesh로 상대에게 닿지 않으면 비공개 메시지는 이 릴레이를 거칩니다. 기본 릴레이는 널리 알려진 주소여서 네트워크 필터가 차단할 수 있습니다 — 그래서 .onion 주소를 포함해 직접 릴레이를 추가할 수 있습니다." + "value" : "mesh로 상대에게 닿지 않으면 비공개 메시지는 이 릴레이를 거칩니다. 기본 릴레이는 널리 알려진 주소여서 네트워크 필터가 차단할 수 있습니다 — 그래서 직접 릴레이를 추가할 수 있습니다." } }, "ms" : { "stringUnit" : { "state" : "translated", - "value" : "apabila mesh tidak dapat mencapai seseorang, pesan peribadi bergerak melalui relay ini. relay terbina dalam ialah alamat yang terkenal dan boleh dihalang oleh penapis rangkaian — jadi anda boleh menambah relay sendiri, termasuk alamat .onion." + "value" : "apabila mesh tidak dapat mencapai seseorang, pesan peribadi bergerak melalui relay ini. relay terbina dalam ialah alamat yang terkenal dan boleh dihalang oleh penapis rangkaian — jadi anda boleh menambah relay sendiri." } }, "ne" : { "stringUnit" : { "state" : "translated", - "value" : "mesh कसैसम्म पुग्न सक्दैन भने निजी सन्देश यी रिले मार्फत जान्छन्। पूर्वनिर्मित रिले सबैलाई थाहा भएका ठेगाना हुन्, जसलाई नेटवर्क फिल्टरले रोक्न सक्छ — त्यसैले तिमी आफ्नै रिले थप्न सक्छौ, .onion ठेगाना पनि।" + "value" : "mesh कसैसम्म पुग्न सक्दैन भने निजी सन्देश यी रिले मार्फत जान्छन्। पूर्वनिर्मित रिले सबैलाई थाहा भएका ठेगाना हुन्, जसलाई नेटवर्क फिल्टरले रोक्न सक्छ — त्यसैले तिमी आफ्नै रिले थप्न सक्छौ।" } }, "nl" : { "stringUnit" : { "state" : "translated", - "value" : "als de mesh iemand niet bereikt, gaan privéberichten via deze relays. de ingebouwde relays zijn bekende adressen die een netwerkfilter kan blokkeren — je kunt dus je eigen relays toevoegen, ook .onion-adressen." + "value" : "als de mesh iemand niet bereikt, gaan privéberichten via deze relays. de ingebouwde relays zijn bekende adressen die een netwerkfilter kan blokkeren — je kunt dus je eigen relays toevoegen." } }, "pl" : { "stringUnit" : { "state" : "translated", - "value" : "gdy mesh nie dosięga kogoś, wiadomości prywatne idą przez te relay. wbudowane to powszechnie znane adresy, które filtr sieciowy może zablokować — możesz więc dodać własne, także adresy .onion." + "value" : "gdy mesh nie dosięga kogoś, wiadomości prywatne idą przez te relay. wbudowane to powszechnie znane adresy, które filtr sieciowy może zablokować — możesz więc dodać własne." } }, "pt" : { "stringUnit" : { "state" : "translated", - "value" : "quando a mesh não chega a alguém, as mensagens privadas seguem por estes relés. os integrados são endereços bem conhecidos que um filtro de rede pode bloquear — por isso podes acrescentar os teus, incluindo endereços .onion." + "value" : "quando a mesh não chega a alguém, as mensagens privadas seguem por estes relés. os integrados são endereços bem conhecidos que um filtro de rede pode bloquear — por isso podes acrescentar os teus." } }, "pt-BR" : { "stringUnit" : { "state" : "translated", - "value" : "quando o mesh não alcança alguém, as mensagens privadas passam por estes relays. os integrados são endereços conhecidos que um filtro de rede pode bloquear — então você pode adicionar os seus, inclusive endereços .onion." + "value" : "quando o mesh não alcança alguém, as mensagens privadas passam por estes relays. os integrados são endereços conhecidos que um filtro de rede pode bloquear — então você pode adicionar os seus." } }, "ru" : { "stringUnit" : { "state" : "translated", - "value" : "когда mesh не достаёт до человека, приватные сообщения идут через эти реле. встроенные — это широко известные адреса, которые может заблокировать сетевой фильтр, поэтому можно добавить свои, в том числе .onion-адреса." + "value" : "когда mesh не достаёт до человека, приватные сообщения идут через эти реле. встроенные — это широко известные адреса, которые может заблокировать сетевой фильтр, поэтому можно добавить свои." } }, "sv" : { "stringUnit" : { "state" : "translated", - "value" : "när mesh inte når fram till någon går privata meddelanden via dessa reläer. de inbyggda är välkända adresser som ett nätverksfilter kan blockera — du kan därför lägga till egna, även .onion-adresser." + "value" : "när mesh inte når fram till någon går privata meddelanden via dessa reläer. de inbyggda är välkända adresser som ett nätverksfilter kan blockera — du kan därför lägga till egna." } }, "ta" : { "stringUnit" : { "state" : "translated", - "value" : "mesh ஒருவரை எட்ட முடியாதபோது, தனிப்பட்ட செய்திகள் இந்த ரிலேகள் வழியாகச் செல்கின்றன. உள்ளமைந்த ரிலேகள் நன்கு அறியப்பட்ட முகவரிகள், அவற்றை நெட்வொர்க் வடிகட்டி தடுக்க முடியும் — எனவே .onion முகவரிகள் உட்பட உங்கள் சொந்த ரிலேகளைச் சேர்க்கலாம்." + "value" : "mesh ஒருவரை எட்ட முடியாதபோது, தனிப்பட்ட செய்திகள் இந்த ரிலேகள் வழியாகச் செல்கின்றன. உள்ளமைந்த ரிலேகள் நன்கு அறியப்பட்ட முகவரிகள், அவற்றை நெட்வொர்க் வடிகட்டி தடுக்க முடியும் — எனவே உங்கள் சொந்த ரிலேகளைச் சேர்க்கலாம்." } }, "th" : { "stringUnit" : { "state" : "translated", - "value" : "เมื่อ mesh ไปไม่ถึงใคร ข้อความส่วนตัวจะเดินทางผ่านรีเลย์เหล่านี้ รีเลย์ที่มาพร้อมแอปเป็นที่อยู่ที่รู้จักกันดีและตัวกรองเครือข่ายปิดกั้นได้ — คุณจึงเพิ่มรีเลย์ของตัวเองได้ รวมถึงที่อยู่ .onion" + "value" : "เมื่อ mesh ไปไม่ถึงใคร ข้อความส่วนตัวจะเดินทางผ่านรีเลย์เหล่านี้ รีเลย์ที่มาพร้อมแอปเป็นที่อยู่ที่รู้จักกันดีและตัวกรองเครือข่ายปิดกั้นได้ — คุณจึงเพิ่มรีเลย์ของตัวเองได้" } }, "tr" : { "stringUnit" : { "state" : "translated", - "value" : "mesh birine ulaşamadığında özel mesajlar bu rölelerden geçer. yerleşik röleler herkesin bildiği adreslerdir ve bir ağ filtresi bunları engelleyebilir — bu yüzden .onion adresleri de dahil kendi rölelerinizi ekleyebilirsiniz." + "value" : "mesh birine ulaşamadığında özel mesajlar bu rölelerden geçer. yerleşik röleler herkesin bildiği adreslerdir ve bir ağ filtresi bunları engelleyebilir — bu yüzden kendi rölelerinizi ekleyebilirsiniz." } }, "uk" : { "stringUnit" : { "state" : "translated", - "value" : "коли mesh не дотягується до людини, приватні повідомлення йдуть через ці релеї. вбудовані — це добре відомі адреси, які може заблокувати мережевий фільтр, тож можна додати власні, зокрема .onion-адреси." + "value" : "коли mesh не дотягується до людини, приватні повідомлення йдуть через ці релеї. вбудовані — це добре відомі адреси, які може заблокувати мережевий фільтр, тож можна додати власні." } }, "ur" : { "stringUnit" : { "state" : "translated", - "value" : "جب mesh کسی تک نہ پہنچ سکے تو نجی پیغامات ان ریلے سے گزرتے ہیں۔ بلٹ اِن ریلے مشہور پتے ہیں جنہیں نیٹ ورک فلٹر روک سکتا ہے — اس لیے آپ اپنے ریلے شامل کر سکتے ہیں، .onion پتے بھی۔" + "value" : "جب mesh کسی تک نہ پہنچ سکے تو نجی پیغامات ان ریلے سے گزرتے ہیں۔ بلٹ اِن ریلے مشہور پتے ہیں جنہیں نیٹ ورک فلٹر روک سکتا ہے — اس لیے آپ اپنے ریلے شامل کر سکتے ہیں۔" } }, "vi" : { "stringUnit" : { "state" : "translated", - "value" : "khi mesh không tới được ai đó, tin nhắn riêng đi qua các relay này. các relay tích hợp là những địa chỉ ai cũng biết nên bộ lọc mạng có thể chặn — vì vậy bạn có thể thêm relay của mình, kể cả địa chỉ .onion." + "value" : "khi mesh không tới được ai đó, tin nhắn riêng đi qua các relay này. các relay tích hợp là những địa chỉ ai cũng biết nên bộ lọc mạng có thể chặn — vì vậy bạn có thể thêm relay của mình." } }, "zh-Hans" : { "stringUnit" : { "state" : "translated", - "value" : "当 mesh 无法触达某人时,私密消息会经这些中继传递。内置中继是众所周知的地址,网络过滤可以封锁它们 — 所以你可以添加自己的中继,包括 .onion 地址。" + "value" : "当 mesh 无法触达某人时,私密消息会经这些中继传递。内置中继是众所周知的地址,网络过滤可以封锁它们 — 所以你可以添加自己的中继。" } }, "zh-Hant" : { "stringUnit" : { "state" : "translated", - "value" : "當 mesh 無法觸及某人時,私密訊息會經這些中繼傳遞。內建中繼是眾所周知的位址,網路過濾可以封鎖它們 — 所以你可以加入自己的中繼,包括 .onion 位址。" + "value" : "當 mesh 無法觸及某人時,私密訊息會經這些中繼傳遞。內建中繼是眾所周知的位址,網路過濾可以封鎖它們 — 所以你可以加入自己的中繼。" } } } @@ -85139,6 +85139,192 @@ } } }, + "notification.redacted.verification.title" : { + "comment" : "Lock-screen notification title for peer verification when message previews are hidden; deliberately omits the peer nickname", + "extractionState" : "manual", + "localizations" : { + "ar" : { + "stringUnit" : { + "state" : "translated", + "value" : "✅ تم التحقق من النظير" + } + }, + "bn" : { + "stringUnit" : { + "state" : "translated", + "value" : "✅ পিয়ার যাচাইকৃত" + } + }, + "de" : { + "stringUnit" : { + "state" : "translated", + "value" : "✅ kontakt verifiziert" + } + }, + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "✅ peer verified" + } + }, + "es" : { + "stringUnit" : { + "state" : "translated", + "value" : "✅ par verificado" + } + }, + "fa" : { + "stringUnit" : { + "state" : "translated", + "value" : "✅ همتا تأیید شد" + } + }, + "fil" : { + "stringUnit" : { + "state" : "translated", + "value" : "✅ na-verify ang peer" + } + }, + "fr" : { + "stringUnit" : { + "state" : "translated", + "value" : "✅ pair vérifié" + } + }, + "he" : { + "stringUnit" : { + "state" : "translated", + "value" : "✅ עמית אומת" + } + }, + "hi" : { + "stringUnit" : { + "state" : "translated", + "value" : "✅ पीयर सत्यापित" + } + }, + "id" : { + "stringUnit" : { + "state" : "translated", + "value" : "✅ peer terverifikasi" + } + }, + "it" : { + "stringUnit" : { + "state" : "translated", + "value" : "✅ peer verificato" + } + }, + "ja" : { + "stringUnit" : { + "state" : "translated", + "value" : "✅ ピアを認証しました" + } + }, + "ko" : { + "stringUnit" : { + "state" : "translated", + "value" : "✅ 피어 인증됨" + } + }, + "ms" : { + "stringUnit" : { + "state" : "translated", + "value" : "✅ rakan disahkan" + } + }, + "ne" : { + "stringUnit" : { + "state" : "translated", + "value" : "✅ पियर प्रमाणित भयो" + } + }, + "nl" : { + "stringUnit" : { + "state" : "translated", + "value" : "✅ peer geverifieerd" + } + }, + "pl" : { + "stringUnit" : { + "state" : "translated", + "value" : "✅ uczestnik zweryfikowany" + } + }, + "pt" : { + "stringUnit" : { + "state" : "translated", + "value" : "✅ par verificado" + } + }, + "pt-BR" : { + "stringUnit" : { + "state" : "translated", + "value" : "✅ par verificado" + } + }, + "ru" : { + "stringUnit" : { + "state" : "translated", + "value" : "✅ участник проверен" + } + }, + "sv" : { + "stringUnit" : { + "state" : "translated", + "value" : "✅ deltagare verifierad" + } + }, + "ta" : { + "stringUnit" : { + "state" : "translated", + "value" : "✅ சகா சரிபார்க்கப்பட்டது" + } + }, + "th" : { + "stringUnit" : { + "state" : "translated", + "value" : "✅ ยืนยันเพียร์แล้ว" + } + }, + "tr" : { + "stringUnit" : { + "state" : "translated", + "value" : "✅ eş doğrulandı" + } + }, + "uk" : { + "stringUnit" : { + "state" : "translated", + "value" : "✅ учасника перевірено" + } + }, + "ur" : { + "stringUnit" : { + "state" : "translated", + "value" : "✅ پیئر کی تصدیق ہو گئی" + } + }, + "vi" : { + "stringUnit" : { + "state" : "translated", + "value" : "✅ đã xác minh ngang hàng" + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "✅ 已验证对端" + } + }, + "zh-Hant" : { + "stringUnit" : { + "state" : "translated", + "value" : "✅ 已驗證對端" + } + } + } + }, "recording %@" : { "comment" : "Voice note recording duration indicator", "localizations" : { diff --git a/bitchat/Services/NotificationService.swift b/bitchat/Services/NotificationService.swift index efca1e5c..880f4312 100644 --- a/bitchat/Services/NotificationService.swift +++ b/bitchat/Services/NotificationService.swift @@ -73,6 +73,9 @@ final class NotificationService { static var geohashActivityTitle: String { String(localized: "notification.redacted.geohash.title", defaultValue: "📍 new activity nearby", comment: "Lock-screen notification title for activity in a location channel when message previews are hidden; deliberately omits the geohash") } + static var verificationTitle: String { + String(localized: "notification.redacted.verification.title", defaultValue: "✅ peer verified", comment: "Lock-screen notification title for peer verification when message previews are hidden; deliberately omits the peer nickname") + } static var body: String { String(localized: "notification.redacted.body", defaultValue: "open bitchat to read", comment: "Lock-screen notification body shown in place of the message text when message previews are hidden") } @@ -205,6 +208,12 @@ final class NotificationService { sendLocalNotification(title: title, body: body, identifier: identifier, userInfo: userInfo) } + func sendVerificationNotification(title: String, body: String, identifier: String) { + let resolvedTitle = hidePreviews ? Redacted.verificationTitle : title + let resolvedBody = hidePreviews ? Redacted.body : body + sendLocalNotification(title: resolvedTitle, body: resolvedBody, identifier: identifier) + } + func sendNetworkAvailableNotification(peerCount: Int) { let title = String(localized: "notification.nearby.title", defaultValue: "👥 bitchatters nearby!", comment: "Title of the local notification when mesh peers come into range") let body = peerCount == 1 diff --git a/bitchat/Services/SharedContentHandoff.swift b/bitchat/Services/SharedContentHandoff.swift index 0e3dce83..6ee17ac5 100644 --- a/bitchat/Services/SharedContentHandoff.swift +++ b/bitchat/Services/SharedContentHandoff.swift @@ -103,11 +103,21 @@ struct SharedContentPayload: Codable, Sendable, Equatable, Identifiable { allowsTextLayout: Bool ) -> Bool { value.unicodeScalars.contains { scalar in - guard CharacterSet.controlCharacters.contains(scalar) else { return false } - if allowsTextLayout, scalar == "\n" || scalar == "\r" || scalar == "\t" { + if scalar.properties.generalCategory == .control { + if allowsTextLayout, scalar == "\n" || scalar == "\r" || scalar == "\t" { + return false + } + return true + } + // Reject bidirectional override/embedding/isolate controls (Trojan Source), + // while allowing ordinary format scalars like ZWJ (U+200D), ZWNJ (U+200C), + // LRM/RLM (U+200E/U+200F), and soft hyphens (U+00AD). + switch scalar.value { + case 0x061C, 0x202A...0x202E, 0x2066...0x2069: + return true + default: return false } - return true } } } diff --git a/bitchat/Services/TestEnvironment.swift b/bitchat/Services/TestEnvironment.swift index 86854a6c..e63a7928 100644 --- a/bitchat/Services/TestEnvironment.swift +++ b/bitchat/Services/TestEnvironment.swift @@ -14,12 +14,19 @@ import Foundation /// `NotificationService` and `LocationStateManager`. enum TestEnvironment { /// True when running under XCTest / Swift Testing or in CI. + /// Compiled out of Release builds so shell environment variables such as + /// `CI` cannot disable persistence, notifications, location, or panic-wipe + /// cleanup in shipping binaries. static let isRunningTests: Bool = { + #if DEBUG let env = ProcessInfo.processInfo.environment return NSClassFromString("XCTestCase") != nil || env["XCTestConfigurationFilePath"] != nil || env["XCTestBundlePath"] != nil || env["GITHUB_ACTIONS"] != nil || env["CI"] != nil + #else + return false + #endif }() } diff --git a/bitchat/Utils/String+Nickname.swift b/bitchat/Utils/String+Nickname.swift index 9a652667..a1bcdd95 100644 --- a/bitchat/Utils/String+Nickname.swift +++ b/bitchat/Utils/String+Nickname.swift @@ -9,6 +9,9 @@ import Foundation extension String { + /// Maximum UTF-8 byte length accepted by `AnnouncementPacket` TLV encoding. + static let maxNicknameUTF8Bytes = 255 + /// Canonical form for nickname storage and comparison (Unicode NFC). /// "café" typed with a combining accent and "café" typed precomposed /// must resolve to the same user wherever nicknames are stored or @@ -17,6 +20,24 @@ extension String { precomposedStringWithCanonicalMapping } + /// Truncates the string on `Character` boundaries so its UTF-8 encoding + /// fits within `maxBytes` without splitting multi-byte scalars or grapheme clusters. + func truncatedToUTF8Bytes(_ maxBytes: Int) -> String { + guard maxBytes > 0 else { return "" } + guard utf8.count > maxBytes else { return self } + var result = "" + var byteCount = 0 + for character in self { + let charBytes = character.utf8.count + if byteCount + charBytes > maxBytes { + break + } + result.append(character) + byteCount += charBytes + } + return result + } + /// Split a nickname into base and a '#abcd' suffix if present func splitSuffix() -> (String, String) { let name = self.replacingOccurrences(of: "@", with: "") diff --git a/bitchat/ViewModels/ChatVerificationCoordinator.swift b/bitchat/ViewModels/ChatVerificationCoordinator.swift index 8aadbd53..b5e97a1b 100644 --- a/bitchat/ViewModels/ChatVerificationCoordinator.swift +++ b/bitchat/ViewModels/ChatVerificationCoordinator.swift @@ -139,7 +139,7 @@ extension ChatViewModel: ChatVerificationContext { } func postLocalNotification(title: String, body: String, identifier: String) { - NotificationService.shared.sendLocalNotification(title: title, body: body, identifier: identifier) + NotificationService.shared.sendVerificationNotification(title: title, body: body, identifier: identifier) } } diff --git a/bitchat/ViewModels/ChatViewModel.swift b/bitchat/ViewModels/ChatViewModel.swift index 5e94425f..f988a718 100644 --- a/bitchat/ViewModels/ChatViewModel.swift +++ b/bitchat/ViewModels/ChatViewModel.swift @@ -177,9 +177,13 @@ final class ChatViewModel: ObservableObject, SynchronousMessageTransportEventDel @Published var nickname: String = "" { didSet { // Canonicalize whenever nickname is set: trim whitespace - // (whitespace-only becomes "") and apply Unicode NFC so accented - // names match regardless of how they were typed. - let cleaned = (nickname.trimmedOrNilIfEmpty ?? "").normalizedNickname + // (whitespace-only becomes ""), apply Unicode NFC so accented + // names match regardless of how they were typed, and cap to + // AnnouncementPacket's 255-byte UTF-8 TLV limit. + let cleaned = (nickname.trimmedOrNilIfEmpty ?? "") + .normalizedNickname + .truncatedToUTF8Bytes(String.maxNicknameUTF8Bytes) + .trimmedOrNilIfEmpty ?? "" if cleaned != nickname { nickname = cleaned return diff --git a/bitchat/Views/AppInfoView.swift b/bitchat/Views/AppInfoView.swift index 02c7d254..74481085 100644 --- a/bitchat/Views/AppInfoView.swift +++ b/bitchat/Views/AppInfoView.swift @@ -115,7 +115,7 @@ struct AppInfoView: View { static let torOffWarning = String(localized: "app_info.settings.tor.off_warning", defaultValue: "tor is off: every relay you connect to can see your IP address, including relays carrying your private messages.", comment: "Warning shown under the tor toggle while tor is switched off, stating that relay operators can see the device IP address") static let relaysTitle = String(localized: "app_info.settings.relays.title", defaultValue: "private message relays", comment: "Title of the relay list editor in settings") - static let relaysSubtitle = String(localized: "app_info.settings.relays.subtitle", defaultValue: "when the mesh can't reach someone, private messages travel through these relays. the built-in ones are well-known addresses that a network filter can block, so you can add your own — including .onion addresses.", comment: "Subtitle explaining what the relay list is for and why someone would add a relay") + static let relaysSubtitle = String(localized: "app_info.settings.relays.subtitle", defaultValue: "when the mesh can't reach someone, private messages travel through these relays. the built-in ones are well-known addresses that a network filter can block, so you can add your own.", comment: "Subtitle explaining what the relay list is for and why someone would add a relay") static let relayBuiltIn = String(localized: "app_info.settings.relays.built_in", defaultValue: "built in", comment: "Label marking a relay as one of the built-in relays, which cannot be removed") static let relayPlaceholder = String(localized: "app_info.settings.relays.placeholder", defaultValue: "wss://relay.example.com", comment: "Placeholder text in the field for adding a relay address") static let relayAdd = String(localized: "app_info.settings.relays.add", defaultValue: "add", comment: "Button that adds the typed relay address to the list") diff --git a/bitchat/Views/ContentView.swift b/bitchat/Views/ContentView.swift index b19fd9d2..34d7a0a6 100644 --- a/bitchat/Views/ContentView.swift +++ b/bitchat/Views/ContentView.swift @@ -87,8 +87,9 @@ extension View { } ) #if os(iOS) - let sourceType: UIImagePickerController.SourceType = + let requestedSourceType: UIImagePickerController.SourceType = mode.wrappedValue == .camera ? .camera : .photoLibrary + let sourceType = ImagePickerView.resolvedSourceType(for: requestedSourceType) return fullScreenCover(isPresented: isPresented) { ImagePickerView(sourceType: sourceType) { image in mode.wrappedValue = nil diff --git a/bitchat/Views/Image Viewers/ImagePickerView.swift b/bitchat/Views/Image Viewers/ImagePickerView.swift index 5079d987..cba650df 100644 --- a/bitchat/Views/Image Viewers/ImagePickerView.swift +++ b/bitchat/Views/Image Viewers/ImagePickerView.swift @@ -15,9 +15,19 @@ struct ImagePickerView: UIViewControllerRepresentable { let sourceType: UIImagePickerController.SourceType let completion: (UIImage?) -> Void + static func resolvedSourceType( + for requested: UIImagePickerController.SourceType, + isAvailable: (UIImagePickerController.SourceType) -> Bool = UIImagePickerController.isSourceTypeAvailable + ) -> UIImagePickerController.SourceType { + if isAvailable(requested) { + return requested + } + return .photoLibrary + } + func makeUIViewController(context: Context) -> UIImagePickerController { let picker = UIImagePickerController() - picker.sourceType = sourceType + picker.sourceType = Self.resolvedSourceType(for: sourceType) picker.delegate = context.coordinator picker.allowsEditing = false diff --git a/bitchat/Views/Image Viewers/ImagePreviewView.swift b/bitchat/Views/Image Viewers/ImagePreviewView.swift index 876c4ca1..07b43b53 100644 --- a/bitchat/Views/Image Viewers/ImagePreviewView.swift +++ b/bitchat/Views/Image Viewers/ImagePreviewView.swift @@ -123,7 +123,7 @@ struct ImagePreviewView: View { let url: URL func makeUIViewController(context: Context) -> UIDocumentPickerViewController { - let controller = UIDocumentPickerViewController(forExporting: [url]) + let controller = UIDocumentPickerViewController(forExporting: [url], asCopy: true) controller.shouldShowFileExtensions = true return controller } diff --git a/bitchatTests/NicknameNormalizationTests.swift b/bitchatTests/NicknameNormalizationTests.swift index 2e45a00f..35e459af 100644 --- a/bitchatTests/NicknameNormalizationTests.swift +++ b/bitchatTests/NicknameNormalizationTests.swift @@ -42,4 +42,31 @@ struct NicknameNormalizationTests { #expect(base == precomposed) #expect(suffix == "#ab12") } + + @Test + func utf8TruncationRespectsByteLimitAndGraphemeBoundaries() { + let longASCII = String(repeating: "a", count: 300) + let truncatedASCII = longASCII.truncatedToUTF8Bytes(String.maxNicknameUTF8Bytes) + #expect(truncatedASCII.utf8.count == 255) + + // 4-byte emoji: 70 * 4 = 280 bytes -> at most 63 emoji (252 bytes), never splitting a scalar. + let emojiNick = String(repeating: "🔥", count: 70) + let truncatedEmoji = emojiNick.truncatedToUTF8Bytes(String.maxNicknameUTF8Bytes) + #expect(truncatedEmoji.count == 63) + #expect(truncatedEmoji.utf8.count == 252) + + // ZWJ family emoji is 25 UTF-8 bytes as one Character; 11 copies = 275 bytes -> 10 copies (250 bytes). + let zwjNick = String(repeating: "👨‍👩‍👧‍👦", count: 11) + let truncatedZWJ = zwjNick.truncatedToUTF8Bytes(String.maxNicknameUTF8Bytes) + #expect(truncatedZWJ.count == 10) + #expect(truncatedZWJ.utf8.count <= String.maxNicknameUTF8Bytes) + + let packet = AnnouncementPacket( + nickname: truncatedEmoji, + noisePublicKey: Data(repeating: 0x11, count: 32), + signingPublicKey: Data(repeating: 0x22, count: 32), + directNeighbors: nil + ) + #expect(packet.encode() != nil) + } } diff --git a/bitchatTests/Services/NotificationRedactionTests.swift b/bitchatTests/Services/NotificationRedactionTests.swift index 6f763244..af723318 100644 --- a/bitchatTests/Services/NotificationRedactionTests.swift +++ b/bitchatTests/Services/NotificationRedactionTests.swift @@ -115,4 +115,34 @@ struct NotificationRedactionTests { #expect(geo.title.contains("u4pruyd")) #expect(geo.body == "someone said something") } + + @Test func redactedVerificationWithholdsPeerNickname() throws { + let (service, deliverer) = makeService(hidePreviews: true) + + service.sendVerificationNotification( + title: "Mutual verification", + body: "You and alice verified each other", + identifier: "verify-mutual-1" + ) + + let content = try #require(deliverer.requests.first).content + #expect(!content.title.contains("alice")) + #expect(!content.body.contains("alice")) + #expect(!content.title.isEmpty) + #expect(!content.body.isEmpty) + } + + @Test func unredactedVerificationShowsPeerNickname() throws { + let (service, deliverer) = makeService(hidePreviews: false) + + service.sendVerificationNotification( + title: "Mutual verification", + body: "You and alice verified each other", + identifier: "verify-mutual-2" + ) + + let content = try #require(deliverer.requests.first).content + #expect(content.title == "Mutual verification") + #expect(content.body == "You and alice verified each other") + } } diff --git a/bitchatTests/SharedContentHandoffTests.swift b/bitchatTests/SharedContentHandoffTests.swift index b2abc33d..4a2f1ab8 100644 --- a/bitchatTests/SharedContentHandoffTests.swift +++ b/bitchatTests/SharedContentHandoffTests.swift @@ -65,6 +65,16 @@ struct SharedContentHandoffTests { try context.store.stage(misleadingControl, now: now) } + let asciiControl = SharedContentPayload.text("bad\u{0000}byte", createdAt: now) + #expect(throws: SharedContentHandoffError.invalidCharacters) { + try context.store.stage(asciiControl, now: now) + } + + let zwjAndBidiMark = SharedContentPayload.text("family 👨‍👩‍👧‍👦 \u{200F}مرحبا\u{00AD}test\u{200C}!", createdAt: now) + try context.store.stage(zwjAndBidiMark, now: now) + #expect(context.store.pending(now: now) == zwjAndBidiMark) + context.defaults.removeObject(forKey: SharedContentStore.storageKey) + let expired = SharedContentPayload.text( "too old", createdAt: now.addingTimeInterval(-SharedContentPayload.retentionSeconds - 1) diff --git a/docs/TOR-INTEGRATION.md b/docs/TOR-INTEGRATION.md index 46f80951..46c9c46c 100644 --- a/docs/TOR-INTEGRATION.md +++ b/docs/TOR-INTEGRATION.md @@ -32,7 +32,7 @@ The settings UI states this while the toggle is off. ## Relays -Private messages target the built-in relay set plus any relays added by hand (`NostrRelaySettings`, capped at 8, `.onion` addresses accepted). The built-in set is four well-known clearnet hostnames, so a filter blocking four names would otherwise end internet-delivered private messages until a new build shipped. +Private messages target the built-in relay set plus any relays added by hand (`NostrRelaySettings`, capped at 8). The built-in set is four well-known clearnet hostnames, so adding custom `wss://` relays lets users work around filters blocking those hosts. `.onion` onion-service relays are not yet supported because `arti-client` is built without the `onion-service-client` feature. ## Artifact maintenance diff --git a/docs/privacy-assessment.md b/docs/privacy-assessment.md index 92598407..74892460 100644 --- a/docs/privacy-assessment.md +++ b/docs/privacy-assessment.md @@ -63,7 +63,7 @@ Public archives contain content already intended for public mesh/board distribut - When mesh bridge is enabled, public mesh messages not marked “nearby only” are signed under a per-cell Nostr identity and published to a neighborhood rendezvous geohash. Presence and public bridge traffic therefore expose a coarse area to relays and participants. - A bridge gateway can carry signed bridge/location events and opaque courier drops for nearby mesh-only peers. It cannot validly publish a neighbor's radio-only message because the author must first sign the bridge event. -- Relays added by hand persist in local preferences (`nostr.customRelays`, at most 8, normalized on read) and are wiped on panic. An added relay names an operator someone chose to route through, so it is treated as sensitive local state rather than inert configuration. `.onion` addresses are accepted, which is the point: the four built-in relays are well-known clearnet hostnames and a filter blocking four names would otherwise end internet-delivered private messages until a new build shipped. +- Relays added by hand persist in local preferences (`nostr.customRelays`, at most 8, normalized on read) and are wiped on panic. An added relay names an operator someone chose to route through, so it is treated as sensitive local state rather than inert configuration. Custom `wss://` relays let users bypass filters blocking the four built-in clearnet hostnames; `.onion` relay connections are not yet supported because the bundled Arti build omits `onion-service-client`. - Turning the Tor preference off routes relay sockets and the relay-directory fetch directly, disclosing the device IP to every relay operator including those carrying private messages. The settings UI states this while the preference is off. Residual risk: Nostr relay retention and logging are outside project control. Public events may be copied indefinitely. Timing, coarse location, and participation can be correlated even when content is encrypted or per-cell identities are used.