diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 935b9106..7b59ada3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -56,7 +56,7 @@ jobs: - name: Install Linux build deps run: | sudo apt-get update - sudo apt-get install -y clang cmake ninja-build pkg-config jq libgtk-3-dev librsvg2-dev libgirepository1.0-dev libgtk-3-bin libgdk-pixbuf2.0-bin libgdk-pixbuf-2.0-dev dpkg-dev patchelf file desktop-file-utils xdg-user-dirs shellcheck libssl-dev libunwind-dev libvulkan-dev libgl1-mesa-dev libasound2-dev libsecret-1-dev + sudo apt-get install -y clang cmake ninja-build pkg-config jq libgtk-3-dev librsvg2-dev libgirepository1.0-dev libgtk-3-bin libgdk-pixbuf2.0-bin libgdk-pixbuf-2.0-dev dpkg-dev patchelf file desktop-file-utils xdg-user-dirs shellcheck libssl-dev libunwind-dev libvulkan-dev libgl1-mesa-dev libasound2-dev libsecret-1-dev libgpg-error0 - uses: actions/cache@v4 with: path: ~/.cache/meshcore-open/appimage @@ -87,7 +87,7 @@ jobs: - name: Test AppImage in clean Ubuntu run: | mkdir -p build/appimage-runtime - docker run --rm --stop-timeout 15 --user "$(id -u):$(id -g)" --mount "type=bind,source=$PWD/build/linux/x64/release/meshcore-open-x86_64.AppImage,target=/artifact.AppImage,readonly" --mount "type=bind,source=$PWD/scripts/appimage/test_runtime.sh,target=/test_runtime.sh,readonly" --mount "type=bind,source=$PWD/build/appimage-runtime,target=/results" meshcore-appimage-runtime:ci timeout --verbose --signal=TERM --kill-after=15s 300s xvfb-run -a bash /test_runtime.sh /artifact.AppImage /results + docker run --rm --stop-timeout 15 --user "$(id -u):$(id -g)" --mount "type=bind,source=$PWD/build/linux/x64/release/meshcore-open-x86_64.AppImage,target=/artifact.AppImage,readonly" --mount "type=bind,source=$PWD/scripts/appimage/test_runtime.sh,target=/test_runtime.sh,readonly" --mount "type=bind,source=$PWD/scripts/appimage/dependencies.sh,target=/dependencies.sh,readonly" --mount "type=bind,source=$PWD/build/appimage-runtime,target=/results" meshcore-appimage-runtime:ci env MESHCORE_APPIMAGE_DEPENDENCIES=/dependencies.sh timeout --verbose --signal=TERM --kill-after=15s 300s xvfb-run -a bash /test_runtime.sh /artifact.AppImage /results - uses: actions/upload-artifact@v4 if: always() with: @@ -126,7 +126,7 @@ jobs: - name: Install Linux build deps run: | sudo apt-get update - sudo apt-get install -y clang cmake ninja-build pkg-config jq libgtk-3-dev librsvg2-dev libgirepository1.0-dev libgtk-3-bin libgdk-pixbuf2.0-bin libgdk-pixbuf-2.0-dev dpkg-dev patchelf file desktop-file-utils xdg-user-dirs shellcheck libssl-dev libunwind-dev libvulkan-dev libgl1-mesa-dev libasound2-dev libsecret-1-dev + sudo apt-get install -y clang cmake ninja-build pkg-config jq libgtk-3-dev librsvg2-dev libgirepository1.0-dev libgtk-3-bin libgdk-pixbuf2.0-bin libgdk-pixbuf-2.0-dev dpkg-dev patchelf file desktop-file-utils xdg-user-dirs shellcheck libssl-dev libunwind-dev libvulkan-dev libgl1-mesa-dev libasound2-dev libsecret-1-dev libgpg-error0 - uses: actions/cache@v4 with: path: ~/.cache/meshcore-open/appimage @@ -163,7 +163,7 @@ jobs: - name: Test ARM64 AppImage in clean Ubuntu run: | mkdir -p build/appimage-runtime - docker run --rm --stop-timeout 15 --platform linux/arm64 --user "$(id -u):$(id -g)" --mount "type=bind,source=$PWD/build/linux/arm64/release/meshcore-open-aarch64.AppImage,target=/artifact.AppImage,readonly" --mount "type=bind,source=$PWD/scripts/appimage/test_runtime.sh,target=/test_runtime.sh,readonly" --mount "type=bind,source=$PWD/build/appimage-runtime,target=/results" meshcore-appimage-runtime-arm64:ci timeout --verbose --signal=TERM --kill-after=15s 300s xvfb-run -a bash /test_runtime.sh /artifact.AppImage /results + docker run --rm --stop-timeout 15 --platform linux/arm64 --user "$(id -u):$(id -g)" --mount "type=bind,source=$PWD/build/linux/arm64/release/meshcore-open-aarch64.AppImage,target=/artifact.AppImage,readonly" --mount "type=bind,source=$PWD/scripts/appimage/test_runtime.sh,target=/test_runtime.sh,readonly" --mount "type=bind,source=$PWD/scripts/appimage/dependencies.sh,target=/dependencies.sh,readonly" --mount "type=bind,source=$PWD/build/appimage-runtime,target=/results" meshcore-appimage-runtime-arm64:ci env MESHCORE_APPIMAGE_DEPENDENCIES=/dependencies.sh timeout --verbose --signal=TERM --kill-after=15s 300s xvfb-run -a bash /test_runtime.sh /artifact.AppImage /results - uses: actions/upload-artifact@v4 if: always() with: diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml new file mode 100644 index 00000000..c8b60cd3 --- /dev/null +++ b/.github/workflows/pages.yml @@ -0,0 +1,37 @@ +name: Deploy blog to GitHub Pages + +on: + push: + branches: + - dev + paths: + - 'blog/**' + - '.github/workflows/pages.yml' + workflow_dispatch: + +permissions: + contents: read + pages: write + id-token: write + +concurrency: + group: pages + cancel-in-progress: false + +jobs: + deploy: + runs-on: ubuntu-latest + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + steps: + - uses: actions/checkout@v4 + + - uses: actions/configure-pages@v5 + + - uses: actions/upload-pages-artifact@v3 + with: + path: blog + + - id: deployment + uses: actions/deploy-pages@v4 diff --git a/README.md b/README.md index 62e028d6..31fb94dc 100644 --- a/README.md +++ b/README.md @@ -241,7 +241,7 @@ dependencies: ```bash sudo apt-get install clang cmake ninja-build pkg-config libgtk-3-dev \ librsvg2-dev libgirepository1.0-dev libgtk-3-bin libgdk-pixbuf2.0-bin \ - libgdk-pixbuf-2.0-dev dpkg-dev patchelf binutils curl jq file desktop-file-utils xdg-user-dirs + libgdk-pixbuf-2.0-dev dpkg-dev patchelf binutils curl jq file desktop-file-utils xdg-user-dirs libgpg-error0 ``` The build automatically downloads checksum-verified architecture-matched @@ -267,12 +267,16 @@ container can write the host-owned output and cache directories. The original native bundle is retained. Custom targets, obfuscation and split-debug-info require a bundle-only build when container rebuilding is needed. -The image includes Flutter assets, native plugins, ONNX Runtime and -redistributable GTK dependencies. It does not include graphics drivers, BlueZ -services, USB permissions, downloaded inference models or user data. The GTK -packaging plugin uses X11, so Wayland sessions need XWayland. The host still -needs compatible glibc and graphics libraries (`libgl1`, `libegl1`, and -`libgles2` on Ubuntu). Launch normally, or without +The image includes Flutter assets, native plugins, ONNX Runtime and the +transitive redistributable runtime libraries. Packaging audits every bundled +ELF and fails if a portable dependency resolves from the build host instead of +the AppDir. Host display-stack libraries (X11/XCB/Wayland) and graphics drivers +remain external so they stay ABI-compatible with the system's EGL/GL driver. +The image also relies on host glibc/the ELF loader, BlueZ services and USB +permissions; downloaded inference models and user data are not included. The +GTK packaging plugin uses X11, so Wayland sessions need XWayland. The host needs +compatible graphics libraries (`libgl1`, `libegl1`, and `libgles2` on Ubuntu). +Launch normally, or without FUSE by extracting: ```bash diff --git a/blog/index.html b/blog/index.html new file mode 100644 index 00000000..124d5a21 --- /dev/null +++ b/blog/index.html @@ -0,0 +1,10 @@ + + +meshcore-open blog + +
+

meshcore-open blog

+ +

meshcore-open on GitHub

+
diff --git a/blog/meshos-claims.html b/blog/meshos-claims.html new file mode 100644 index 00000000..3c228f4e --- /dev/null +++ b/blog/meshos-claims.html @@ -0,0 +1,181 @@ + + + + + +Checking the MeshOS "exposed" post + + + +
+ +

I checked the MeshOS "exposed" post. It doesn't hold up.

+

November 7, 2026

+ +

A post on meshoskey.com claims the MeshOS Companion Android app has a hidden pipeline that scores your photos, reads your contacts and texts, and quietly uploads it all to the developer. That's a serious accusation, so I spent the day checking it. I'm the developer of meshcore-open (a different, open source MeshCore client) and have no connection to MeshOS. I just wanted to know if it was true.

+ +

Short version: it isn't. The post says it analysed v1.0.31. I pulled that exact build apart and none of the things it describes are in there. The strings it quotes don't exist, the addresses it gives point at unrelated code, and the app doesn't even have the Android permissions needed to read contacts or SMS. I also ran it with fake contacts, texts and photos planted on the phone and decrypted all of its traffic. None of the planted data ever left the device.

+ +

Details below so anyone can check my work.

+ +

The APKs

+ +

All from the official releases page, github.com/andymux/meshos-releases. The SHA-256s match the digests GitHub publishes for each release:

+ +
+ + + + + + +
VersionSHA-256
1.0.31fd4970e1b1446ddb0d2985c3b54837857a970da663b212fdb3d3c1f07ac47103
1.0.32a6a3b04dcc741a6a59525f7dc2ab883f57927665edf9c30826db0a1af679a18b
1.0.33f42f8834a010499e72dad5f5138b054e7c1a2e6a3155c15edf37ebfd76543183
1.0.34426d43cabfaba76a0119715e4160c6369449ee50aa7858b0fb023a3533dcf6ec
1.0.3550264287e2ccd4e02cc6615879f4b54eb2392d9b1eb56329f001a65360f8422e
+ +

I did the deep analysis on 1.0.31 (the one the post is about) and 1.0.35 (latest). For the others I checked permissions and strings. The Dart code lives in lib/arm64-v8a/libapp.so; for 1.0.31 that file hashes to cdc8abe1…ec83402, so you can make sure you're looking at the same bytes I was.

+ +

Contacts and SMS: not possible

+ +

This one is simple. To read contacts or texts on Android an app has to declare READ_CONTACTS / READ_SMS and the user has to grant them. None of the five versions declare either one, or any permission to browse the photo library. The permission list is identical across all five. Without those permissions Android just refuses, no matter what the code tries to do.

+ +

I looked anyway. There's no contacts or SMS code in the Java side, in the Dart side, or in any of the bundled native libraries. When the app says "contacts" it means radio/mesh contacts.

+ +

The strings the post quotes

+ +

The post names a lot of specific identifiers. If the pipeline existed, these would have to be in the binary. I searched 1.0.31 for every one of them (raw file, the Dart constant pool, and the Java bytecode):

+ +
harvest_v1   harvest_seq   harvest_blob
+mqtt.meshcore.co.uk   meshcore/companion/.../harvest/kill   img/kill
+com.meshcore.companion/harvest   /contacts   /sms   /upload   /mqtt
+content://com.android.providers.contacts   raw_contacts
+Pictures/Insta   Snapchat/Sent   Snapchat/Received   Telegram/Image
+Selfie   ootd   lingerie   battery_level   screen_on_duration
+ImageUpload: harvest_seq=   USER_PRESENT
+ +

Zero hits for all of them. The post says the strings are XOR'd with 0xB3, so I XOR'd the whole file with 0xB3 and searched again. Still nothing. I also tried every other single-byte key. Nothing.

+ +

The only identifier from the post that does exist is com.meshcore.companion/signing, which the post itself says is normal.

+ +

The addresses

+ +

The post gives exact locations (offsets) in the app's code file for each piece of the supposed pipeline, and even for a few text strings and a licence key. Those are easy to check: you jump to that spot in the file and see what's there. In this file the offsets map directly onto the code, so there's no room for an "it's a different kind of address" mix-up.

+ +

Two things to know when reading the table. First, a function, a piece of text and a key are different kinds of things and live in different parts of the file. Text and keys sit in a data area. The code area only holds instructions. Second, a real function has a clear starting point, and pointing into the middle of one makes no sense.

+ +
+ + + + + + + + + + + + +
OffsetThe post says it'sWhat's actually there
0x8A1C40the photo tag scannerThe middle of Dart's own built-in networking code, which ships with every Flutter app. Nothing to do with photos.
0x8A2080a lookup table for photo tagsA single instruction in that same networking function. Not a table.
0x8A20A0a table of folder namesAnother instruction in the same function, one that jumps to other code. No folder names anywhere.
0x8B4100the text of the contacts database addressAn instruction that compares two numbers. Not text.
0x8B4210the code that reads contacts and SMSThe middle of Flutter's screen-layout code (the part that works out where things go on screen).
0x8C1A00the code that packs up the stolen dataThe middle of Flutter's image-effects code (blur and colour filters).
0x8C1A58the word "nonce"An instruction that unpacks a number. Not text.
0x8C1A60the word "harvest_v1"An instruction that reads a value from memory. Not text.
0x8C1A80the app's licence keyInstructions that compare numbers. The real licence key is somewhere else entirely, stored with the app's data where it belongs.
0x8D0400where the hidden upload startsThe middle of a big number math routine used by the encryption library. It's an instruction that jumps backwards within that routine.
0x8E2000the remote "kill switch" handlerA function that only compares decimal numbers and has no text in it at all, so it can't be handling server messages or topic names.
+ +

So none of the "functions" are where functions start, and the "text" and "key" are actually program instructions. The special number the post says marks a "harvest" upload (0x1DD3) isn't used anywhere in the app either. I can't explain where these locations came from, but they don't describe this app.

+ +

If you want to check the raw details: at 0x8A2080 the instruction is ldr x16, [x26,#0x48], at 0x8C1A58 it's sbfx x6, x0, #1, #0x1f, at 0x8C1A60 it's ldur w7, [x3, #0xb], the "licence key" bytes at 0x8C1A80 start 22 7c 41 93 df 00 02 eb, and at 0x8D0400 it's b #0x8d01e0.

+ +

What the app really does with photos

+ +

Some of what the post describes is real. It just isn't hidden. There is an upload to https://tiles.meshcore.co.uk/img, it is application/octet-stream, it does send X-MeshOS-Enc: gcm, and it is AES-GCM. That's the "Send a photo" button.

+ +

When you send a photo the app picks it through the normal Android picker, generates a random key, encrypts the image, uploads the ciphertext and puts a link in the chat like …/i/abc.jpg#k=KEY. Everything after the # never goes to the server. So the server only stores data it can't open, and only people who can read the chat message can view the photo. The upload code is only reached from three places: sending a photo or voice note in a DM, sending one in a channel, and broadcasting your own profile picture. All three are things you do on purpose. The upload format is a 12-byte nonce, the ciphertext, then a 16-byte tag. I suspect that 12 is where the post's "12-field blob" came from. The image code also has an 8-step loop that lowers JPEG quality until the file is small enough, which might be where "eight thumbnails" came from.

+ +

The key isn't derived from the licence or a device ID. It's random every time. You'll see why I'm sure about that in the next part.

+ +

Running it with bait

+ +

I set up an Android 15 emulator, forced every connection through mitmproxy with its certificate installed as a system cert (the app doesn't pin certs, so all HTTPS decrypted fine), and kept a packet capture running. Then I planted things the post says the app goes after:

+ + + +

I used 1.0.35 and 1.0.31 normally. I sent a photo, set a profile picture, chatted, rebooted, locked and unlocked, and left them idle. Every upload I saw lined up with something I did:

+ + + +

Everything else was downloads: map tiles, avatars, a version check. None of the bait names, numbers, codes or filenames showed up anywhere in the traffic.

+ +

decrypted uploadFor the one photo upload, I took the key out of the app's own message store (#k=0uiiv2YsDTlgwpR1KRRpSQ) and decrypted the 2,909 bytes I'd captured. Out came a 2,881-byte JPEG: the blue square from the Snapchat folder that I had picked, and nothing else. No extra data, no metadata, no bait text. That's the image on the right.

+ +

Unlock triggers don't exist either. Nothing in the app listens for unlock or screen-on events. The only startup hook is a boot receiver that opens the app if you've turned on "start on boot", which is off by default.

+ +

Second opinions

+ +

I didn't want to rely only on my own reading, so I also gave the decompiled code and the post's claims to three AI models: OpenAI's Codex, Z.ai's GLM 5.3 and Claude Mythos 5.1. I didn't tell any of them what I'd found. All three came back with the same answer on the main question: none of the claimed harvesting exists. Codex and Mythos each re-checked every offset against the raw 1.0.31 binary and got the same instructions I did.

+ +

I didn't just take their word on the details either. Everything new they raised, I checked myself before it went in here, and anything that didn't hold up was left out.

+ +

Things I'd actually flag to the developer

+ +

The app isn't spyware, but there are real issues worth fixing:

+ + + +

What I didn't check

+ +

I can't see the server. I only tested the Android app, versions 1.0.31 to 1.0.35, not the T-Deck build or anything older. My disassembly covered about 95% of the Dart code; the rest can't get around Android permissions anyway. Each live session ran for around half an hour, not days.

+ +

Check it yourself

+ +
    +
  1. Grab the APKs from the releases page and compare the hashes above.
  2. +
  3. aapt dump permissions MeshOS-v1.0.31.apk. No contacts, SMS or media permissions.
  4. +
  5. unzip MeshOS-v1.0.31.apk lib/arm64-v8a/libapp.so, then grep -c harvest libapp.so. You'll get 0.
  6. +
  7. xxd -s 0x8C1A60 -l 16 libapp.so and the other offsets. Run the bytes through any ARM64 disassembler.
  8. +
  9. For the code: blutter for the Dart side, jadx for Java.
  10. +
  11. For traffic: emulator with -http-proxy pointed at mitmproxy and the mitmproxy CA added as a system cert.
  12. +
+ +
+

I did this because I think it's the right thing to do. Accusing a developer of secretly building spyware is serious, and people deserve to know whether it's true. I'd want the same if it were my app. Everything above can be checked by anyone, and if I've got something wrong I'd like to hear about it.

+ +

- Zach

+ +
+ + diff --git a/lib/connector/meshcore_connector.dart b/lib/connector/meshcore_connector.dart index 0b8ff9f8..2755e3bc 100644 --- a/lib/connector/meshcore_connector.dart +++ b/lib/connector/meshcore_connector.dart @@ -9,6 +9,7 @@ import 'package:flutter/foundation.dart'; import 'package:flutter_blue_plus/flutter_blue_plus.dart'; import 'package:flutter_blue_plus_platform_interface/flutter_blue_plus_platform_interface.dart'; +import '../utils/advert_signature.dart'; import '../models/channel.dart'; import '../models/channel_message.dart'; import '../models/companion_radio_stats.dart'; @@ -6433,6 +6434,13 @@ class MeshCoreConnector extends ChangeNotifier { _contactsStorageFull = false; // capacity freed up since the warning } _hasLoadedContacts = true; + if (!_preserveContactsOnRefresh && !_contactSyncUsesSinceFilter) { + // A full sync replaced _contacts; drop keys the radio no longer + // holds so removed nodes reappear in discovery. + _knownContactKeys + ..clear() + ..addAll(_contacts.map((c) => c.publicKeyHex)); + } _preserveContactsOnRefresh = false; _telemetryFixesDuringSync.clear(); _contactSyncUsesSinceFilter = false; @@ -9383,13 +9391,15 @@ class MeshCoreConnector extends ChangeNotifier { final rawPacket = frame.sublist(3); switch (payloadType) { case payloadTypeADVERT: - _handlePayloadAdvertReceived( - rawPacket, - payload, - pathBytes, - pathHashWidth, - routeType, - snr, + unawaited( + _verifyThenHandleAdvert( + rawPacket, + payload, + pathBytes, + pathHashWidth, + routeType, + snr, + ), ); break; default: @@ -9400,89 +9410,32 @@ class MeshCoreConnector extends ChangeNotifier { } } - void importContact(Uint8List frame) { - final packet = BufferReader(frame); - int payloadType = 0; - Uint8List pathBytes = Uint8List(0); - int pathHashWidth = 1; - try { - packet.skipBytes(1); // Skip frame type byte - packet.skipBytes(1); // Skip SNR byte - packet.skipBytes(1); // Skip RSSI byte - final header = packet.readByte(); - final routeType = header & 0x03; - payloadType = (header >> 2) & 0x0F; - if (routeType == _routeTransportFlood || - routeType == _routeTransportDirect) { - packet.skipBytes(4); // Skip transport-specific bytes - } - //final payloadVer = (header >> 6) & 0x03; - final pathLenRaw = packet.readByte(); - final pathByteLen = decodePathByteLen(pathLenRaw); - pathHashWidth = decodePathHashWidth(pathLenRaw); - pathBytes = packet.readBytes(pathByteLen); - } catch (e) { - appLogger.warn('Malformed RX frame: $e', tag: 'Connector'); + /// Drops adverts whose Ed25519 signature does not verify against the + /// advertised public key, so forged adverts cannot add or update a contact + /// of any type (chat, repeater, room, sensor). + Future _verifyThenHandleAdvert( + Uint8List rawPacket, + Uint8List payload, + Uint8List path, + int pathHashWidth, + int routeType, + double snr, + ) async { + if (!await verifyAdvertSignature(payload)) { + appLogger.warn( + 'Dropped advert with invalid signature' + '${payload.length >= 4 ? ' from ${pubKeyToHex(payload.sublist(0, 4))}' : ''}', + tag: 'Connector', + ); return; } - double? latitude; - double? longitude; - String name = ''; - Uint8List publicKey = Uint8List(0); - int type = 0; - int timestamp = 0; - bool hasLocation = false; - bool hasName = false; - if (payloadType != payloadTypeADVERT) { - appLogger.warn('Unexpected payload type: $payloadType', tag: 'Connector'); - return; - } - try { - publicKey = packet.readBytes(32); - timestamp = packet.readInt32LE(); - //TODO add signature verification - packet.skipBytes(64); // Skip signature for now - final flags = packet.readByte(); - type = flags & 0x0F; - hasLocation = (flags & 0x10) != 0; - hasName = (flags & 0x80) != 0; - if (hasLocation && packet.remaining >= 8) { - latitude = packet.readInt32LE() / 1e6; - longitude = packet.readInt32LE() / 1e6; - } - // Two optional 16-bit feature fields sit between the location and the - // name (AdvertDataParser in MeshCore AdvertDataHelpers.cpp). Skip them - // so their bytes aren't read as the start of the name. - for (final featureMask in const [0x20, 0x40]) { - if ((flags & featureMask) != 0 && packet.remaining >= 2) { - packet.skipBytes(2); - } - } - if (hasName && packet.remaining > 0) { - name = packet.readCString(); - } - } catch (e) { - appLogger.warn('Malformed advert frame: $e', tag: 'Connector'); - return; - } - - importDiscoveredContact( - Contact( - rawPacket: frame, - publicKey: publicKey, - name: name, - type: type, - pathLength: pathBytes.isEmpty - ? -1 - : (pathBytes.length ~/ pathHashWidth), - // Store hop order reversed for easier outgoing messages; keep bytes - // inside each multi-byte hop in their original order. - path: _reversePathByHop(pathBytes, pathHashWidth), - pathHashWidth: pathHashWidth, - latitude: latitude, - longitude: longitude, - lastSeen: DateTime.fromMillisecondsSinceEpoch(timestamp * 1000), - ), + _handlePayloadAdvertReceived( + rawPacket, + payload, + path, + pathHashWidth, + routeType, + snr, ); } @@ -9522,8 +9475,8 @@ class MeshCoreConnector extends ChangeNotifier { .join(); timestamp = advert.readInt32LE(); - //TODO add signature verification - advert.skipBytes(64); // Skip signature for now + // Signature already checked by _verifyThenHandleAdvert. + advert.skipBytes(signatureSize); final flags = advert.readByte(); type = flags & 0x0F; hasLocation = (flags & 0x10) != 0; diff --git a/lib/l10n/app_bg.arb b/lib/l10n/app_bg.arb index b0176f46..f157bd62 100644 --- a/lib/l10n/app_bg.arb +++ b/lib/l10n/app_bg.arb @@ -1017,6 +1017,7 @@ "repeater_received": "Получено", "repeater_duplicates": "Дубликати", "repeater_daysHoursMinsSecs": "{days} дни {hours}ч {minutes}м {seconds}с", + "repeater_hoursMinsSecs": "{hours}ч {minutes}м {seconds}с", "@repeater_daysHoursMinsSecs": { "placeholders": { "days": { diff --git a/lib/l10n/app_de.arb b/lib/l10n/app_de.arb index 103114fb..62474dc7 100644 --- a/lib/l10n/app_de.arb +++ b/lib/l10n/app_de.arb @@ -1039,6 +1039,7 @@ "repeater_received": "Empfangen", "repeater_duplicates": "Duplikate", "repeater_daysHoursMinsSecs": "{days} Tage {hours}h {minutes}m {seconds}s", + "repeater_hoursMinsSecs": "{hours}h {minutes}m {seconds}s", "@repeater_daysHoursMinsSecs": { "placeholders": { "days": { diff --git a/lib/l10n/app_en.arb b/lib/l10n/app_en.arb index 0d4cbf92..67e347b1 100644 --- a/lib/l10n/app_en.arb +++ b/lib/l10n/app_en.arb @@ -1716,6 +1716,20 @@ } } }, + "repeater_hoursMinsSecs": "{hours}h {minutes}m {seconds}s", + "@repeater_hoursMinsSecs": { + "placeholders": { + "hours": { + "type": "int" + }, + "minutes": { + "type": "int" + }, + "seconds": { + "type": "int" + } + } + }, "repeater_packetTxTotal": "Total: {total}, Flood: {flood}, Direct: {direct}", "@repeater_packetTxTotal": { "placeholders": { diff --git a/lib/l10n/app_es.arb b/lib/l10n/app_es.arb index a29e3b2c..3a7e05b1 100644 --- a/lib/l10n/app_es.arb +++ b/lib/l10n/app_es.arb @@ -1031,6 +1031,7 @@ "repeater_received": "Recibidos", "repeater_duplicates": "Duplicados", "repeater_daysHoursMinsSecs": "{days} días {hours}h {minutes} min {seconds} s", + "repeater_hoursMinsSecs": "{hours}h {minutes} min {seconds} s", "@repeater_daysHoursMinsSecs": { "placeholders": { "days": { diff --git a/lib/l10n/app_fr.arb b/lib/l10n/app_fr.arb index 49a6c852..1e5b7252 100644 --- a/lib/l10n/app_fr.arb +++ b/lib/l10n/app_fr.arb @@ -1031,6 +1031,7 @@ "repeater_received": "Reçu", "repeater_duplicates": "Doublons", "repeater_daysHoursMinsSecs": "{days} jours {hours}h {minutes}m {seconds}s", + "repeater_hoursMinsSecs": "{hours}h {minutes}m {seconds}s", "@repeater_daysHoursMinsSecs": { "placeholders": { "days": { diff --git a/lib/l10n/app_hu.arb b/lib/l10n/app_hu.arb index b70a7c49..6c55fe28 100644 --- a/lib/l10n/app_hu.arb +++ b/lib/l10n/app_hu.arb @@ -1245,6 +1245,7 @@ "repeater_received": "Fogadva", "repeater_duplicates": "Ismétlődések", "repeater_daysHoursMinsSecs": "{days} nap {hours}ó {minutes}p {seconds}s", + "repeater_hoursMinsSecs": "{hours}ó {minutes}p {seconds}s", "@repeater_daysHoursMinsSecs": { "placeholders": { "days": { diff --git a/lib/l10n/app_it.arb b/lib/l10n/app_it.arb index f8a93299..a7c3f056 100644 --- a/lib/l10n/app_it.arb +++ b/lib/l10n/app_it.arb @@ -1076,6 +1076,7 @@ "repeater_received": "Ricevuto", "repeater_duplicates": "Duplicati", "repeater_daysHoursMinsSecs": "{days} giorni {hours}h {minutes}m {seconds}s", + "repeater_hoursMinsSecs": "{hours}h {minutes}m {seconds}s", "@repeater_daysHoursMinsSecs": { "placeholders": { "days": { diff --git a/lib/l10n/app_ja.arb b/lib/l10n/app_ja.arb index 01ce88c1..33c964ac 100644 --- a/lib/l10n/app_ja.arb +++ b/lib/l10n/app_ja.arb @@ -1213,6 +1213,7 @@ "repeater_received": "受信済み", "repeater_duplicates": "重複", "repeater_daysHoursMinsSecs": "{days}日 {hours}時間 {minutes}分 {seconds}秒", + "repeater_hoursMinsSecs": "{hours}時間 {minutes}分 {seconds}秒", "@repeater_daysHoursMinsSecs": { "placeholders": { "days": { @@ -1257,7 +1258,7 @@ } } }, - "repeater_duplicatesFloodDirect": "{flood}: {flood}, 直接: {direct}", + "repeater_duplicatesFloodDirect": "フラッド: {flood}, 直接: {direct}", "@repeater_duplicatesFloodDirect": { "placeholders": { "flood": { diff --git a/lib/l10n/app_ko.arb b/lib/l10n/app_ko.arb index 4f6fe8e4..6a8bca8a 100644 --- a/lib/l10n/app_ko.arb +++ b/lib/l10n/app_ko.arb @@ -1195,6 +1195,7 @@ "repeater_received": "수신", "repeater_duplicates": "중복", "repeater_daysHoursMinsSecs": "{days}일 {hours}시간 {minutes}분 {seconds}초", + "repeater_hoursMinsSecs": "{hours}시간 {minutes}분 {seconds}초", "@repeater_daysHoursMinsSecs": { "placeholders": { "days": { diff --git a/lib/l10n/app_localizations.dart b/lib/l10n/app_localizations.dart index 9f3e8f9f..151cf8dd 100644 --- a/lib/l10n/app_localizations.dart +++ b/lib/l10n/app_localizations.dart @@ -5654,6 +5654,12 @@ abstract class AppLocalizations { int seconds, ); + /// No description provided for @repeater_hoursMinsSecs. + /// + /// In en, this message translates to: + /// **'{hours}h {minutes}m {seconds}s'** + String repeater_hoursMinsSecs(int hours, int minutes, int seconds); + /// No description provided for @repeater_packetTxTotal. /// /// In en, this message translates to: diff --git a/lib/l10n/app_localizations_bg.dart b/lib/l10n/app_localizations_bg.dart index 435c6fdf..49b443c9 100644 --- a/lib/l10n/app_localizations_bg.dart +++ b/lib/l10n/app_localizations_bg.dart @@ -3206,6 +3206,11 @@ class AppLocalizationsBg extends AppLocalizations { return '$days дни $hoursч $minutesм $secondsс'; } + @override + String repeater_hoursMinsSecs(int hours, int minutes, int seconds) { + return '$hoursч $minutesм $secondsс'; + } + @override String repeater_packetTxTotal(int total, String flood, String direct) { return 'Общо: $total, Flood: $flood, Директно: $direct'; diff --git a/lib/l10n/app_localizations_de.dart b/lib/l10n/app_localizations_de.dart index c0a36e3d..e7828826 100644 --- a/lib/l10n/app_localizations_de.dart +++ b/lib/l10n/app_localizations_de.dart @@ -3205,6 +3205,11 @@ class AppLocalizationsDe extends AppLocalizations { return '$days Tage ${hours}h ${minutes}m ${seconds}s'; } + @override + String repeater_hoursMinsSecs(int hours, int minutes, int seconds) { + return '${hours}h ${minutes}m ${seconds}s'; + } + @override String repeater_packetTxTotal(int total, String flood, String direct) { return 'Gesamt: $total, Flood: $flood, Direkt: $direct'; diff --git a/lib/l10n/app_localizations_en.dart b/lib/l10n/app_localizations_en.dart index 8ff30407..61261327 100644 --- a/lib/l10n/app_localizations_en.dart +++ b/lib/l10n/app_localizations_en.dart @@ -3154,6 +3154,11 @@ class AppLocalizationsEn extends AppLocalizations { return '$days days ${hours}h ${minutes}m ${seconds}s'; } + @override + String repeater_hoursMinsSecs(int hours, int minutes, int seconds) { + return '${hours}h ${minutes}m ${seconds}s'; + } + @override String repeater_packetTxTotal(int total, String flood, String direct) { return 'Total: $total, Flood: $flood, Direct: $direct'; diff --git a/lib/l10n/app_localizations_es.dart b/lib/l10n/app_localizations_es.dart index ed0cdfb7..87ff1058 100644 --- a/lib/l10n/app_localizations_es.dart +++ b/lib/l10n/app_localizations_es.dart @@ -3193,6 +3193,11 @@ class AppLocalizationsEs extends AppLocalizations { return '$days días ${hours}h $minutes min $seconds s'; } + @override + String repeater_hoursMinsSecs(int hours, int minutes, int seconds) { + return '${hours}h $minutes min $seconds s'; + } + @override String repeater_packetTxTotal(int total, String flood, String direct) { return 'Total: $total, Inundación: $flood, Directo: $direct'; diff --git a/lib/l10n/app_localizations_fr.dart b/lib/l10n/app_localizations_fr.dart index a8fcec54..1538b799 100644 --- a/lib/l10n/app_localizations_fr.dart +++ b/lib/l10n/app_localizations_fr.dart @@ -3204,6 +3204,11 @@ class AppLocalizationsFr extends AppLocalizations { return '$days jours ${hours}h ${minutes}m ${seconds}s'; } + @override + String repeater_hoursMinsSecs(int hours, int minutes, int seconds) { + return '${hours}h ${minutes}m ${seconds}s'; + } + @override String repeater_packetTxTotal(int total, String flood, String direct) { return 'Total : $total, Tout le réseau : $flood, Direct : $direct'; diff --git a/lib/l10n/app_localizations_hu.dart b/lib/l10n/app_localizations_hu.dart index c5fbbbaa..236d0089 100644 --- a/lib/l10n/app_localizations_hu.dart +++ b/lib/l10n/app_localizations_hu.dart @@ -3195,6 +3195,11 @@ class AppLocalizationsHu extends AppLocalizations { return '$days nap $hoursó ${minutes}p ${seconds}s'; } + @override + String repeater_hoursMinsSecs(int hours, int minutes, int seconds) { + return '$hoursó ${minutes}p ${seconds}s'; + } + @override String repeater_packetTxTotal(int total, String flood, String direct) { return 'Összesen: $total, Elárasztás: $flood, Közvetlen: $direct'; diff --git a/lib/l10n/app_localizations_it.dart b/lib/l10n/app_localizations_it.dart index 31cf6cbb..63c5ca60 100644 --- a/lib/l10n/app_localizations_it.dart +++ b/lib/l10n/app_localizations_it.dart @@ -3201,6 +3201,11 @@ class AppLocalizationsIt extends AppLocalizations { return '$days giorni ${hours}h ${minutes}m ${seconds}s'; } + @override + String repeater_hoursMinsSecs(int hours, int minutes, int seconds) { + return '${hours}h ${minutes}m ${seconds}s'; + } + @override String repeater_packetTxTotal(int total, String flood, String direct) { return 'Totale: $total, Flood: $flood, Diretto: $direct'; diff --git a/lib/l10n/app_localizations_ja.dart b/lib/l10n/app_localizations_ja.dart index e2d696c2..baab9e08 100644 --- a/lib/l10n/app_localizations_ja.dart +++ b/lib/l10n/app_localizations_ja.dart @@ -3066,6 +3066,11 @@ class AppLocalizationsJa extends AppLocalizations { return '$days日 $hours時間 $minutes分 $seconds秒'; } + @override + String repeater_hoursMinsSecs(int hours, int minutes, int seconds) { + return '$hours時間 $minutes分 $seconds秒'; + } + @override String repeater_packetTxTotal(int total, String flood, String direct) { return '合計: $total, フラッド: $flood, 直接: $direct'; @@ -3078,7 +3083,7 @@ class AppLocalizationsJa extends AppLocalizations { @override String repeater_duplicatesFloodDirect(String flood, String direct) { - return '$flood: $flood, 直接: $direct'; + return 'フラッド: $flood, 直接: $direct'; } @override diff --git a/lib/l10n/app_localizations_ko.dart b/lib/l10n/app_localizations_ko.dart index 0a347c7a..96f1334e 100644 --- a/lib/l10n/app_localizations_ko.dart +++ b/lib/l10n/app_localizations_ko.dart @@ -3070,6 +3070,11 @@ class AppLocalizationsKo extends AppLocalizations { return '$days일 $hours시간 $minutes분 $seconds초'; } + @override + String repeater_hoursMinsSecs(int hours, int minutes, int seconds) { + return '$hours시간 $minutes분 $seconds초'; + } + @override String repeater_packetTxTotal(int total, String flood, String direct) { return '총: $total, 플러딩: $flood, 직접: $direct'; diff --git a/lib/l10n/app_localizations_nl.dart b/lib/l10n/app_localizations_nl.dart index b0c52ee1..2cfb4a4d 100644 --- a/lib/l10n/app_localizations_nl.dart +++ b/lib/l10n/app_localizations_nl.dart @@ -3182,6 +3182,11 @@ class AppLocalizationsNl extends AppLocalizations { return '$days dagen $hours uur $minutes minuten $seconds seconden'; } + @override + String repeater_hoursMinsSecs(int hours, int minutes, int seconds) { + return '$hours uur $minutes minuten $seconds seconden'; + } + @override String repeater_packetTxTotal(int total, String flood, String direct) { return 'Totaal: $total, Flood: $flood, Direct: $direct'; diff --git a/lib/l10n/app_localizations_pl.dart b/lib/l10n/app_localizations_pl.dart index 1784cfb4..518e9ad3 100644 --- a/lib/l10n/app_localizations_pl.dart +++ b/lib/l10n/app_localizations_pl.dart @@ -3219,6 +3219,11 @@ class AppLocalizationsPl extends AppLocalizations { return '$days dni ${hours}h ${minutes}m ${seconds}s'; } + @override + String repeater_hoursMinsSecs(int hours, int minutes, int seconds) { + return '${hours}h ${minutes}m ${seconds}s'; + } + @override String repeater_packetTxTotal(int total, String flood, String direct) { return 'Razem: $total, Flood: $flood, Bezpośrednio: $direct'; diff --git a/lib/l10n/app_localizations_pt.dart b/lib/l10n/app_localizations_pt.dart index e9ccc7c7..77ee28c2 100644 --- a/lib/l10n/app_localizations_pt.dart +++ b/lib/l10n/app_localizations_pt.dart @@ -3194,6 +3194,11 @@ class AppLocalizationsPt extends AppLocalizations { return '$days dias ${hours}h ${minutes}m ${seconds}s'; } + @override + String repeater_hoursMinsSecs(int hours, int minutes, int seconds) { + return '${hours}h ${minutes}m ${seconds}s'; + } + @override String repeater_packetTxTotal(int total, String flood, String direct) { return 'Total: $total, Inundação: $flood, Direto: $direct'; diff --git a/lib/l10n/app_localizations_ru.dart b/lib/l10n/app_localizations_ru.dart index b00cc8fc..98e32a78 100644 --- a/lib/l10n/app_localizations_ru.dart +++ b/lib/l10n/app_localizations_ru.dart @@ -3200,6 +3200,11 @@ class AppLocalizationsRu extends AppLocalizations { return '$days дн. $hoursч $minutesм $secondsс'; } + @override + String repeater_hoursMinsSecs(int hours, int minutes, int seconds) { + return '$hoursч $minutesм $secondsс'; + } + @override String repeater_packetTxTotal(int total, String flood, String direct) { return 'Всего: $total, Рассылка: $flood, Прямые: $direct'; diff --git a/lib/l10n/app_localizations_sk.dart b/lib/l10n/app_localizations_sk.dart index 751efb15..c9b0cdce 100644 --- a/lib/l10n/app_localizations_sk.dart +++ b/lib/l10n/app_localizations_sk.dart @@ -3191,6 +3191,11 @@ class AppLocalizationsSk extends AppLocalizations { return '$days dní ${hours}h ${minutes}m ${seconds}s'; } + @override + String repeater_hoursMinsSecs(int hours, int minutes, int seconds) { + return '${hours}h ${minutes}m ${seconds}s'; + } + @override String repeater_packetTxTotal(int total, String flood, String direct) { return 'Celkom: $total, Flood: $flood, Priame: $direct'; diff --git a/lib/l10n/app_localizations_sl.dart b/lib/l10n/app_localizations_sl.dart index 71ddd940..03eac143 100644 --- a/lib/l10n/app_localizations_sl.dart +++ b/lib/l10n/app_localizations_sl.dart @@ -3184,6 +3184,11 @@ class AppLocalizationsSl extends AppLocalizations { return '$days dni ${hours}h ${minutes}m ${seconds}s'; } + @override + String repeater_hoursMinsSecs(int hours, int minutes, int seconds) { + return '${hours}h ${minutes}m ${seconds}s'; + } + @override String repeater_packetTxTotal(int total, String flood, String direct) { return 'Skupno: $total, Flood: $flood, Neposredno: $direct'; diff --git a/lib/l10n/app_localizations_sv.dart b/lib/l10n/app_localizations_sv.dart index 4a4bc187..5232f703 100644 --- a/lib/l10n/app_localizations_sv.dart +++ b/lib/l10n/app_localizations_sv.dart @@ -3170,6 +3170,11 @@ class AppLocalizationsSv extends AppLocalizations { return '$days dagar $hours timmar $minutes minuter $seconds sekunder'; } + @override + String repeater_hoursMinsSecs(int hours, int minutes, int seconds) { + return '$hours timmar $minutes minuter $seconds sekunder'; + } + @override String repeater_packetTxTotal(int total, String flood, String direct) { return 'Totalt: $total, Flood: $flood, Direkt: $direct'; diff --git a/lib/l10n/app_localizations_uk.dart b/lib/l10n/app_localizations_uk.dart index b9a6c535..aef4723f 100644 --- a/lib/l10n/app_localizations_uk.dart +++ b/lib/l10n/app_localizations_uk.dart @@ -3193,6 +3193,11 @@ class AppLocalizationsUk extends AppLocalizations { return '$days дн. $hours год $minutes хв $seconds с'; } + @override + String repeater_hoursMinsSecs(int hours, int minutes, int seconds) { + return '$hours год $minutes хв $seconds с'; + } + @override String repeater_packetTxTotal(int total, String flood, String direct) { return 'Всього: $total, Через всю мережу: $flood, Прямі: $direct'; diff --git a/lib/l10n/app_localizations_zh.dart b/lib/l10n/app_localizations_zh.dart index ef525c93..aa71eadc 100644 --- a/lib/l10n/app_localizations_zh.dart +++ b/lib/l10n/app_localizations_zh.dart @@ -3025,6 +3025,11 @@ class AppLocalizationsZh extends AppLocalizations { return '$days天 $hours小时 $minutes分 $seconds秒'; } + @override + String repeater_hoursMinsSecs(int hours, int minutes, int seconds) { + return '$hours小时 $minutes分 $seconds秒'; + } + @override String repeater_packetTxTotal(int total, String flood, String direct) { return '总计:$total,泛洪:$flood,直连:$direct'; diff --git a/lib/l10n/app_nl.arb b/lib/l10n/app_nl.arb index 4dc53271..ec88cf3c 100644 --- a/lib/l10n/app_nl.arb +++ b/lib/l10n/app_nl.arb @@ -1044,6 +1044,7 @@ "repeater_received": "Ontvangen", "repeater_duplicates": "Duplicaten", "repeater_daysHoursMinsSecs": "{days} dagen {hours} uur {minutes} minuten {seconds} seconden", + "repeater_hoursMinsSecs": "{hours} uur {minutes} minuten {seconds} seconden", "@repeater_daysHoursMinsSecs": { "placeholders": { "days": { diff --git a/lib/l10n/app_pl.arb b/lib/l10n/app_pl.arb index cab97323..ffede934 100644 --- a/lib/l10n/app_pl.arb +++ b/lib/l10n/app_pl.arb @@ -1027,6 +1027,7 @@ "repeater_received": "Otrzymano", "repeater_duplicates": "Powtórzenia", "repeater_daysHoursMinsSecs": "{days} dni {hours}h {minutes}m {seconds}s", + "repeater_hoursMinsSecs": "{hours}h {minutes}m {seconds}s", "@repeater_daysHoursMinsSecs": { "placeholders": { "days": { diff --git a/lib/l10n/app_pt.arb b/lib/l10n/app_pt.arb index d1eb52a8..1b8065f0 100644 --- a/lib/l10n/app_pt.arb +++ b/lib/l10n/app_pt.arb @@ -1009,6 +1009,7 @@ "repeater_received": "Recebido", "repeater_duplicates": "Duplicatas", "repeater_daysHoursMinsSecs": "{days} dias {hours}h {minutes}m {seconds}s", + "repeater_hoursMinsSecs": "{hours}h {minutes}m {seconds}s", "@repeater_daysHoursMinsSecs": { "placeholders": { "days": { diff --git a/lib/l10n/app_ru.arb b/lib/l10n/app_ru.arb index 7c3627f3..0d65138a 100644 --- a/lib/l10n/app_ru.arb +++ b/lib/l10n/app_ru.arb @@ -627,6 +627,7 @@ "repeater_received": "Получено", "repeater_duplicates": "Дубликаты", "repeater_daysHoursMinsSecs": "{days} дн. {hours}ч {minutes}м {seconds}с", + "repeater_hoursMinsSecs": "{hours}ч {minutes}м {seconds}с", "repeater_packetTxTotal": "Всего: {total}, Рассылка: {flood}, Прямые: {direct}", "repeater_packetRxTotal": "Всего: {total}, Рассылка: {flood}, Прямые: {direct}", "repeater_duplicatesFloodDirect": "Рассылка: {flood}, Прямые: {direct}", diff --git a/lib/l10n/app_sk.arb b/lib/l10n/app_sk.arb index ed0b7ce2..8b546e3f 100644 --- a/lib/l10n/app_sk.arb +++ b/lib/l10n/app_sk.arb @@ -1017,6 +1017,7 @@ "repeater_received": "Prijaté", "repeater_duplicates": "Duplikáty", "repeater_daysHoursMinsSecs": "{days} dní {hours}h {minutes}m {seconds}s", + "repeater_hoursMinsSecs": "{hours}h {minutes}m {seconds}s", "@repeater_daysHoursMinsSecs": { "placeholders": { "days": { diff --git a/lib/l10n/app_sl.arb b/lib/l10n/app_sl.arb index f9cf8f3e..4b8e9b65 100644 --- a/lib/l10n/app_sl.arb +++ b/lib/l10n/app_sl.arb @@ -1009,6 +1009,7 @@ "repeater_received": "Prejeto", "repeater_duplicates": "Duplikati", "repeater_daysHoursMinsSecs": "{days} dni {hours}h {minutes}m {seconds}s", + "repeater_hoursMinsSecs": "{hours}h {minutes}m {seconds}s", "@repeater_daysHoursMinsSecs": { "placeholders": { "days": { diff --git a/lib/l10n/app_sv.arb b/lib/l10n/app_sv.arb index 4367644b..30e3769b 100644 --- a/lib/l10n/app_sv.arb +++ b/lib/l10n/app_sv.arb @@ -1010,6 +1010,7 @@ "repeater_received": "Mottaget", "repeater_duplicates": "Dubbletter", "repeater_daysHoursMinsSecs": "{days} dagar {hours} timmar {minutes} minuter {seconds} sekunder", + "repeater_hoursMinsSecs": "{hours} timmar {minutes} minuter {seconds} sekunder", "@repeater_daysHoursMinsSecs": { "placeholders": { "days": { diff --git a/lib/l10n/app_uk.arb b/lib/l10n/app_uk.arb index 51a57fac..2d4d91d8 100644 --- a/lib/l10n/app_uk.arb +++ b/lib/l10n/app_uk.arb @@ -1027,6 +1027,7 @@ "repeater_received": "Отримано", "repeater_duplicates": "Дублікати", "repeater_daysHoursMinsSecs": "{days} дн. {hours} год {minutes} хв {seconds} с", + "repeater_hoursMinsSecs": "{hours} год {minutes} хв {seconds} с", "@repeater_daysHoursMinsSecs": { "placeholders": { "days": { diff --git a/lib/l10n/app_zh.arb b/lib/l10n/app_zh.arb index 79d85d7e..96239481 100644 --- a/lib/l10n/app_zh.arb +++ b/lib/l10n/app_zh.arb @@ -1039,6 +1039,7 @@ "repeater_received": "接收", "repeater_duplicates": "重复", "repeater_daysHoursMinsSecs": "{days}天 {hours}小时 {minutes}分 {seconds}秒", + "repeater_hoursMinsSecs": "{hours}小时 {minutes}分 {seconds}秒", "@repeater_daysHoursMinsSecs": { "placeholders": { "days": { diff --git a/lib/screens/channels_screen.dart b/lib/screens/channels_screen.dart index c47c604e..a0ef96cf 100644 --- a/lib/screens/channels_screen.dart +++ b/lib/screens/channels_screen.dart @@ -697,6 +697,7 @@ class _ChannelsScreenState extends State } void _handleQuickSwitch(int index, BuildContext context) { + FocusManager.instance.primaryFocus?.unfocus(); if (index == 1) return; switch (index) { case 0: diff --git a/lib/screens/contacts_screen.dart b/lib/screens/contacts_screen.dart index f886bdec..27cb6798 100644 --- a/lib/screens/contacts_screen.dart +++ b/lib/screens/contacts_screen.dart @@ -796,7 +796,7 @@ class _ContactsScreenState extends State ), ], child: SizedBox( - height: 48, + height: _controlHeight(context), child: DecoratedBox( decoration: BoxDecoration( border: Border.all(color: Theme.of(context).colorScheme.outline), @@ -822,6 +822,13 @@ class _ContactsScreenState extends State ); } + /// Height of the group/search controls; grows with the system font size so + /// larger text is not clipped. + double _controlHeight(BuildContext context) { + final textHeight = MediaQuery.textScalerOf(context).scale(16) * 1.5; + return (textHeight + 20).clamp(48.0, 120.0); + } + Widget _buildContactsBody(BuildContext context, MeshCoreConnector connector) { final viewState = context.watch(); final contacts = connector.contacts; @@ -959,7 +966,7 @@ class _ContactsScreenState extends State width: viewState.contactsSearchExpanded ? searchExpandedWidth : searchCollapsedWidth, - height: 48, + height: _controlHeight(context), child: DecoratedBox( decoration: BoxDecoration( border: Border.all( @@ -1267,6 +1274,7 @@ class _ContactsScreenState extends State } void _handleQuickSwitch(int index, BuildContext context) { + FocusManager.instance.primaryFocus?.unfocus(); if (index == 0) return; switch (index) { case 1: diff --git a/lib/screens/line_of_sight_map_screen.dart b/lib/screens/line_of_sight_map_screen.dart index bc872516..568b17ae 100644 --- a/lib/screens/line_of_sight_map_screen.dart +++ b/lib/screens/line_of_sight_map_screen.dart @@ -1728,6 +1728,7 @@ class _LineOfSightMapScreenState extends State { } void _handleQuickSwitch(int index, BuildContext context) { + FocusManager.instance.primaryFocus?.unfocus(); if (index == 2) { Navigator.pop(context); return; diff --git a/lib/screens/map_screen.dart b/lib/screens/map_screen.dart index eed1ae7d..13130c03 100644 --- a/lib/screens/map_screen.dart +++ b/lib/screens/map_screen.dart @@ -3183,6 +3183,7 @@ class _MapScreenState extends State with DisconnectNavigationMixin { } void _handleQuickSwitch(int index, BuildContext context) { + FocusManager.instance.primaryFocus?.unfocus(); if (index == 2) return; switch (index) { case 0: diff --git a/lib/screens/message_filter_settings_screen.dart b/lib/screens/message_filter_settings_screen.dart index a62dd0e6..c98e4064 100644 --- a/lib/screens/message_filter_settings_screen.dart +++ b/lib/screens/message_filter_settings_screen.dart @@ -178,6 +178,8 @@ class _RulesList extends StatelessWidget { SnackBar( content: Text(l10n.messageFilter_ruleDeleted), duration: const Duration(seconds: 6), + // Newer Flutter persists snackbars with an action unless told not to. + persist: false, action: SnackBarAction( label: l10n.common_undo, onPressed: () => diff --git a/lib/screens/repeater_status_screen.dart b/lib/screens/repeater_status_screen.dart index 409712a8..2525abd6 100644 --- a/lib/screens/repeater_status_screen.dart +++ b/lib/screens/repeater_status_screen.dart @@ -375,15 +375,24 @@ class _RepeaterStatusScreenState extends State { final hours = (seconds % 86400) ~/ 3600; final minutes = (seconds % 3600) ~/ 60; final secs = seconds % 60; + if (days == 0) return l10n.repeater_hoursMinsSecs(hours, minutes, secs); return l10n.repeater_daysHoursMinsSecs(days, hours, minutes, secs); } + /// Puts each "Label: n" part of a multi-part stat on its own line. Matches + /// the comma separators used across locales (ASCII, fullwidth, ideographic, + /// Arabic); the values themselves are unformatted integers. + static final _partSeparator = RegExp(r'\s*[,\uFF0C\u3001\u060C]\s*'); + String _multiLine(String text) => text.split(_partSeparator).join('\n'); + String _packetTxText() { if (_packetsSent == null) return '—'; final l10n = context.l10n; final flood = _formatValue(_floodTx); final direct = _formatValue(_directTx); - return l10n.repeater_packetTxTotal(_packetsSent!, flood, direct); + return _multiLine( + l10n.repeater_packetTxTotal(_packetsSent!, flood, direct), + ); } String _packetRxText() { @@ -391,7 +400,9 @@ class _RepeaterStatusScreenState extends State { final l10n = context.l10n; final flood = _formatValue(_floodRx); final direct = _formatValue(_directRx); - return l10n.repeater_packetRxTotal(_packetsRecv!, flood, direct); + return _multiLine( + l10n.repeater_packetRxTotal(_packetsRecv!, flood, direct), + ); } String _chanUtilText() { @@ -404,7 +415,7 @@ class _RepeaterStatusScreenState extends State { if (_dupFlood != null || _dupDirect != null) { final flood = _formatValue(_dupFlood); final direct = _formatValue(_dupDirect); - return l10n.repeater_duplicatesFloodDirect(flood, direct); + return _multiLine(l10n.repeater_duplicatesFloodDirect(flood, direct)); } if (_packetsRecv == null || _floodRx == null || _directRx == null) { return '—'; @@ -703,7 +714,8 @@ class _RepeaterStatusScreenState extends State { final textScaler = MediaQuery.textScalerOf(context); return LayoutBuilder( builder: (context, constraints) { - final columns = constraints.maxWidth / textScaler.scale(1) < 320 + // One full-width tile per row on phones; two columns on wide screens. + final columns = constraints.maxWidth / textScaler.scale(1) < 520 ? 1 : 2; // Rows size to their tallest tile, so labels that wrap at large diff --git a/lib/theme/mesh_theme.dart b/lib/theme/mesh_theme.dart index 4ccea3e9..90e40539 100644 --- a/lib/theme/mesh_theme.dart +++ b/lib/theme/mesh_theme.dart @@ -569,7 +569,7 @@ class MeshTheme { return TextStyle( fontFamily: MeshFonts.sans, fontFamilyFallback: MeshFonts.sansFallback, - fontSize: 11.5, + fontSize: 12, fontWeight: selected ? FontWeight.w700 : FontWeight.w500, letterSpacing: 0.1, color: selected ? scheme.onPrimary : scheme.onSurfaceVariant, @@ -602,7 +602,9 @@ class MeshTheme { ), snackBarTheme: SnackBarThemeData( backgroundColor: scheme.surfaceContainerHigh, - contentTextStyle: TextStyle(color: scheme.onSurface), + contentTextStyle: TextStyle(color: scheme.onSurface, fontSize: 16), + actionTextColor: scheme.onSurface, + disabledActionTextColor: scheme.onSurfaceVariant, behavior: SnackBarBehavior.floating, shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(MeshRadii.md), diff --git a/lib/utils/advert_signature.dart b/lib/utils/advert_signature.dart new file mode 100644 index 00000000..49068405 --- /dev/null +++ b/lib/utils/advert_signature.dart @@ -0,0 +1,73 @@ +import 'dart:typed_data'; + +import 'package:cryptography/cryptography.dart'; + +/// Advert payload layout (MeshCore `Mesh::createAdvert`): +/// `[pub_key 32][timestamp u32 LE][signature 64][app_data …]`. +const int _pubKeyLen = 32; +const int _timestampLen = 4; +const int _signatureLen = 64; +const int advertSignedHeaderLen = _pubKeyLen + _timestampLen + _signatureLen; + +final Ed25519 _ed25519 = Ed25519(); + +/// Verified results keyed by signature, so the same advert heard over +/// several paths is only checked once. +final Map _verifiedCache = {}; +const int _verifiedCacheMax = 256; + +/// Returns true when [payload] is an advert whose Ed25519 signature over +/// `pub_key || timestamp || app_data` verifies against its own public key. +/// Applies to every advert type (chat, repeater, room, sensor). +Future verifyAdvertSignature(Uint8List payload) async { + if (payload.length < advertSignedHeaderLen) return false; + + final publicKey = Uint8List.sublistView(payload, 0, _pubKeyLen); + final timestamp = Uint8List.sublistView( + payload, + _pubKeyLen, + _pubKeyLen + _timestampLen, + ); + final signature = Uint8List.sublistView( + payload, + _pubKeyLen + _timestampLen, + advertSignedHeaderLen, + ); + final appData = Uint8List.sublistView(payload, advertSignedHeaderLen); + + final cacheKey = + String.fromCharCodes(publicKey) + String.fromCharCodes(signature); + final cached = _verifiedCache[cacheKey]; + if (cached != null) return cached; + + final message = Uint8List(_pubKeyLen + _timestampLen + appData.length) + ..setRange(0, _pubKeyLen, publicKey) + ..setRange(_pubKeyLen, _pubKeyLen + _timestampLen, timestamp) + ..setRange( + _pubKeyLen + _timestampLen, + _pubKeyLen + _timestampLen + appData.length, + appData, + ); + + bool valid; + try { + valid = await _ed25519.verify( + message, + signature: Signature( + Uint8List.fromList(signature), + publicKey: SimplePublicKey( + Uint8List.fromList(publicKey), + type: KeyPairType.ed25519, + ), + ), + ); + } catch (_) { + valid = false; + } + + if (_verifiedCache.length >= _verifiedCacheMax) { + _verifiedCache.remove(_verifiedCache.keys.first); + } + _verifiedCache[cacheKey] = valid; + return valid; +} diff --git a/lib/widgets/adaptive_app_bar_title.dart b/lib/widgets/adaptive_app_bar_title.dart index 12363dd7..42167287 100644 --- a/lib/widgets/adaptive_app_bar_title.dart +++ b/lib/widgets/adaptive_app_bar_title.dart @@ -1,5 +1,7 @@ import 'package:flutter/material.dart'; +/// App bar title that honors the system font size. Long titles are +/// ellipsized instead of being shrunk to fit. class AdaptiveAppBarTitle extends StatelessWidget { final String text; @@ -7,11 +9,6 @@ class AdaptiveAppBarTitle extends StatelessWidget { @override Widget build(BuildContext context) { - return LayoutBuilder( - builder: (context, constraints) => SizedBox( - width: constraints.maxWidth, - child: FittedBox(fit: BoxFit.scaleDown, child: Text(text, maxLines: 1)), - ), - ); + return Text(text, maxLines: 1, overflow: TextOverflow.ellipsis); } } diff --git a/lib/widgets/filter_rule_dialog.dart b/lib/widgets/filter_rule_dialog.dart index a415aa41..716d3e5a 100644 --- a/lib/widgets/filter_rule_dialog.dart +++ b/lib/widgets/filter_rule_dialog.dart @@ -100,6 +100,11 @@ class _FilterRuleDialogState extends State<_FilterRuleDialog> { content: SizedBox( width: 420, child: SingleChildScrollView( + // The outlined field's floating label is painted above the field's + // box, outside the scroll content bounds. Without top padding the + // viewport clips it (worst when the focused field is scrolled flush + // to the top while the keyboard is open). + padding: const EdgeInsets.only(top: 16), child: Column( mainAxisSize: MainAxisSize.min, crossAxisAlignment: CrossAxisAlignment.start, @@ -107,6 +112,14 @@ class _FilterRuleDialogState extends State<_FilterRuleDialog> { TextField( controller: _controller, autofocus: true, + // Keep room above the field when it is scrolled into view, so + // the floating label (drawn above the box) is not clipped. + scrollPadding: EdgeInsets.fromLTRB( + 20, + 16 + MediaQuery.textScalerOf(context).scale(16), + 20, + 20, + ), minLines: 1, maxLines: 4, textInputAction: TextInputAction.done, diff --git a/lib/widgets/mesh_ui.dart b/lib/widgets/mesh_ui.dart index d4ada371..fd159266 100644 --- a/lib/widgets/mesh_ui.dart +++ b/lib/widgets/mesh_ui.dart @@ -261,7 +261,7 @@ class StatTile extends StatelessWidget { label.toUpperCase(), style: MeshTheme.accentLabel( color: scheme.onSurfaceVariant, - fontSize: 12, + fontSize: 14, ), maxLines: 2, overflow: TextOverflow.ellipsis, @@ -270,30 +270,26 @@ class StatTile extends StatelessWidget { ], ), const SizedBox(height: 6), - FittedBox( - fit: BoxFit.scaleDown, - alignment: AlignmentDirectional.centerStart, - child: Text.rich( - TextSpan( - text: value, - style: MeshTheme.mono( - fontSize: 17, - fontWeight: FontWeight.w600, - color: scheme.onSurface, - ), - children: [ - if (unit != null) - TextSpan( - text: ' $unit', - style: MeshTheme.mono( - fontSize: 12, - color: scheme.onSurfaceVariant, - ), - ), - ], + Text.rich( + TextSpan( + text: value, + style: MeshTheme.mono( + fontSize: 20, + fontWeight: FontWeight.w600, + color: scheme.onSurface, ), - maxLines: 1, + children: [ + if (unit != null) + TextSpan( + text: ' $unit', + style: MeshTheme.mono( + fontSize: 12, + color: scheme.onSurfaceVariant, + ), + ), + ], ), + softWrap: true, ), ], ), diff --git a/scripts/appimage/AppRun b/scripts/appimage/AppRun index 5aaaaece..c9e412d8 100644 --- a/scripts/appimage/AppRun +++ b/scripts/appimage/AppRun @@ -2,6 +2,8 @@ set -eo pipefail export APPDIR="${APPDIR:-$(cd "$(dirname "$0")" && pwd)}" +unset GIO_EXTRA_MODULES GIO_MODULE_DIR GI_TYPELIB_PATH GTK_PATH GTK_MODULES GDK_PIXBUF_MODULE_FILE +export GSETTINGS_SCHEMA_DIR="$APPDIR/usr/share/glib-2.0/schemas" export PATH="$APPDIR/usr/bin:$PATH" for hook in "$APPDIR"/apprun-hooks/*.sh; do # shellcheck source=/dev/null diff --git a/scripts/appimage/Dockerfile b/scripts/appimage/Dockerfile index 605484d4..fdb54385 100644 --- a/scripts/appimage/Dockerfile +++ b/scripts/appimage/Dockerfile @@ -7,7 +7,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ librsvg2-dev libgirepository1.0-dev libgdk-pixbuf-2.0-dev libgtk-3-bin \ libgdk-pixbuf2.0-bin binutils patchelf curl jq \ file desktop-file-utils xdg-user-dirs git rsync unzip xz-utils make g++ dpkg-dev \ - libssl-dev libunwind-dev libvulkan-dev libgl1-mesa-dev libglu1-mesa-dev \ + libssl-dev libunwind-dev libvulkan-dev libgl1-mesa-dev libglu1-mesa-dev libgpg-error0 \ libasound2-dev libsecret-1-dev \ && rm -rf /var/lib/apt/lists/* @@ -23,5 +23,5 @@ FROM ${BASE_IMAGE} AS runtime-test ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update && apt-get install -y --no-install-recommends \ xvfb xauth x11-utils x11-apps xdotool imagemagick dbus-x11 binutils libgl1 libegl1 libgles2 \ - libgl1-mesa-dri fonts-dejavu-core \ + libgl1-mesa-dri libgpg-error0 fonts-dejavu-core \ && rm -rf /var/lib/apt/lists/* \ No newline at end of file diff --git a/scripts/appimage/dependencies.sh b/scripts/appimage/dependencies.sh new file mode 100644 index 00000000..1c153352 --- /dev/null +++ b/scripts/appimage/dependencies.sh @@ -0,0 +1,181 @@ +#!/usr/bin/env bash +set -euo pipefail + +fail() { + printf 'AppImage dependencies: %s\n' "$*" >&2 + return 1 +} + +is_host_interface() { + case "$1" in + linux-vdso.so.*|ld-linux*.so.*|ld64.so.*|libc.so.*|libm.so.*|libpthread.so.*|\ + libdl.so.*|librt.so.*|libresolv.so.*|libutil.so.*|libanl.so.*|\ + libBrokenLocale.so.*|libnss_*.so.*|libGL.so.*|libGLX.so.*|libEGL.so.*|\ + libGLES*.so.*|libOpenGL.so.*|libglapi.so.*|libvulkan.so.*|libdrm*.so.*|libgbm.so.*|\ + libX*.so.*|libxcb*.so.*|libwayland*.so.*|libxkbcommon.so.*) + return 0 + ;; + *) return 1 ;; + esac +} + +is_inside_appdir() { + [[ "$1" == "$2/"* ]] +} + +copy_dependency() { + local appdir="$1" soname="$2" source="$3" source_real real_name library_dir target existing_real + source_real="$(realpath -e -- "$source")" || { + fail "Cannot resolve dependency $soname from $source" + return 1 + } + [[ -f "$source_real" ]] || { fail "Dependency is not a regular file: $source_real"; return 1; } + real_name="${source_real##*/}" + library_dir="$appdir/usr/lib" + target="$library_dir/$real_name" + mkdir -p "$library_dir" + if [[ -e "$target" || -L "$target" ]]; then + existing_real="$(realpath -e -- "$target")" || { + fail "Broken bundled library path: $target" + return 1 + } + if [[ "$existing_real" != "$source_real" ]] && ! cmp -s -- "$existing_real" "$source_real"; then + fail "Conflicting libraries map to $target" + return 1 + fi + else + cp -p -- "$source_real" "$target" + fi + if [[ "$soname" != "$real_name" ]]; then + if [[ -e "$library_dir/$soname" || -L "$library_dir/$soname" ]]; then + existing_real="$(realpath -e -- "$library_dir/$soname")" || { + fail "Broken bundled SONAME link: $library_dir/$soname" + return 1 + } + if [[ "$existing_real" != "$source_real" ]] && ! cmp -s -- "$existing_real" "$source_real"; then + fail "Conflicting libraries provide SONAME $soname" + return 1 + fi + else + ln -s "$real_name" "$library_dir/$soname" + fi + fi +} + +scan_appdir() { + local appdir="$1" report="$2" mode="$3" changed_name="$4" + local appdir_real search_path elf output status line soname resolution resolved resolved_real + local failed=0 copied_any=0 + local -a elf_files=() + appdir_real="$(realpath -e -- "$appdir")" + search_path="$appdir/usr/lib:$appdir/usr/bin/lib" + : > "$report" + mapfile -d '' -t elf_files < <(find "$appdir/usr/bin" "$appdir/usr/lib" \ + \( -type f -o -type l \) -print0 2>/dev/null || true) + for elf in "${elf_files[@]}"; do + readelf -h "$elf" >/dev/null 2>&1 || continue + printf '%s\n' "${elf#"$appdir/"}" >> "$report" + if output="$(LD_LIBRARY_PATH="$search_path" ldd "$elf" 2>&1)"; then + status=0 + else + status=$? + fi + while IFS= read -r line; do + soname='' + resolution='' + if [[ "$line" =~ ^[[:space:]]*([^[:space:]]+)[[:space:]]*=\>[[:space:]]*(.*)$ ]]; then + soname="${BASH_REMATCH[1]}" + resolution="${BASH_REMATCH[2]}" + elif [[ "$line" =~ ^[[:space:]]*(/[^[:space:]]+) ]]; then + resolution="${BASH_REMATCH[1]}" + soname="${resolution##*/}" + else + continue + fi + soname="${soname##*/}" + if [[ "$resolution" == 'not found'* ]]; then + if is_host_interface "$soname"; then + printf ' %s => NOT PRESENT ON AUDIT HOST [host interface]\n' "$soname" >> "$report" + else + printf ' %s => NOT FOUND\n' "$soname" >> "$report" + printf 'AppImage dependencies: %s needs missing %s\n' "$elf" "$soname" >&2 + failed=1 + fi + continue + fi + resolved="$resolution" + if [[ "$resolved" =~ ^(.*)[[:space:]]+\(0x[[:xdigit:]]+\)$ ]]; then + resolved="${BASH_REMATCH[1]}" + fi + [[ "$resolved" == /* ]] || continue + if ! resolved_real="$(realpath -e -- "$resolved" 2>/dev/null)"; then + if is_host_interface "$soname"; then + printf ' %s => NOT PRESENT ON AUDIT HOST (%s) [host interface]\n' \ + "$soname" "$resolved" >> "$report" + else + printf ' %s => UNRESOLVED (%s)\n' "$soname" "$resolved" >> "$report" + printf 'AppImage dependencies: %s resolves %s to missing path %s\n' \ + "$elf" "$soname" "$resolved" >&2 + failed=1 + fi + continue + fi + if is_inside_appdir "$resolved_real" "$appdir_real"; then + printf ' %s => %s [bundled]\n' "$soname" "$resolved_real" >> "$report" + elif is_host_interface "$soname"; then + printf ' %s => %s [host interface]\n' "$soname" "$resolved_real" >> "$report" + elif [[ "$mode" == bundle ]]; then + printf ' %s => %s [bundling]\n' "$soname" "$resolved_real" >> "$report" + copy_dependency "$appdir" "$soname" "$resolved_real" + copied_any=1 + else + printf ' %s => %s [unexpected host dependency]\n' "$soname" "$resolved_real" >> "$report" + printf 'AppImage dependencies: %s resolves non-allowlisted %s from %s\n' \ + "$elf" "$soname" "$resolved_real" >&2 + failed=1 + fi + done <<< "$output" + if ((status != 0)) || [[ "$output" =~ version[[:space:]].*not[[:space:]]found ]]; then + printf 'AppImage dependencies: ldd dependency check failed for %s (exit %s): %s\n' \ + "$elf" "$status" "$output" >&2 + failed=1 + fi + done + printf -v "$changed_name" '%s' "$copied_any" + ((failed == 0)) +} + +bundle_appdir_dependencies() { + local appdir="$1" report="$2" pass changed + for ((pass = 1; pass <= 32; pass++)); do + scan_appdir "$appdir" "$report" bundle changed || return 1 + ((changed == 1)) || break + done + ((pass <= 32)) || { fail 'Dependency closure did not converge after 32 passes'; return 1; } + audit_appdir_dependencies "$appdir" "$report" +} + +audit_appdir_dependencies() { + local appdir="$1" report="$2" changed=0 + scan_appdir "$appdir" "$report" audit changed +} + +main() { + [[ $# == 3 ]] || { fail 'Usage: dependencies.sh bundle|audit APPDIR REPORT'; return 1; } + local mode="$1" appdir="$2" report="$3" + [[ -d "$appdir/usr/bin" && -d "$appdir/usr/lib" ]] || { + fail "Invalid AppDir: $appdir" + return 1 + } + command -v readelf >/dev/null || { fail 'Missing readelf'; return 1; } + command -v ldd >/dev/null || { fail 'Missing ldd'; return 1; } + case "$mode" in + bundle) bundle_appdir_dependencies "$appdir" "$report" ;; + audit) audit_appdir_dependencies "$appdir" "$report" ;; + *) fail "Unknown mode: $mode"; return 1 ;; + esac +} + +if [[ "${BASH_SOURCE[0]}" == "$0" ]]; then + main "$@" +fi \ No newline at end of file diff --git a/scripts/appimage/test_packaging.sh b/scripts/appimage/test_packaging.sh index 5b7d8d51..02436fae 100644 --- a/scripts/appimage/test_packaging.sh +++ b/scripts/appimage/test_packaging.sh @@ -147,4 +147,92 @@ mock_glibc=2.39 requires_container_rebuild "$temporary/bundle/meshcore_open" 2.39 unset -f readelf getconf +mkdir -p "$temporary/audit-appdir/usr/bin" "$temporary/audit-appdir/usr/lib" \ + "$temporary/host" "$temporary/fakebin" +cp "$(type -P true)" "$temporary/audit-appdir/usr/bin/fixture" +printf 'test library\n' > "$temporary/host/libgpg-error.so.0.37.0" +ln -s libgpg-error.so.0.37.0 "$temporary/host/libgpg-error.so.0" +printf 'host display library\n' > "$temporary/host/libwayland-client.so.0" +cat > "$temporary/fakebin/ldd" <<'EOF' +#!/usr/bin/env bash +if [[ "${MESHCORE_TEST_LDD_VERSION_FAILURE:-0}" == 1 ]]; then + printf "%s: /lib/x86_64-linux-gnu/libc.so.6: version 'GLIBC_2.39' not found (required by %s)\n" \ + "$MESHCORE_TEST_APPDIR/usr/bin/fixture" "$MESHCORE_TEST_APPDIR/usr/bin/fixture" + exit 1 +fi +if [[ -e "$MESHCORE_TEST_HOST_WAYLAND" ]]; then + printf 'libwayland-client.so.0 => %s (0x0)\n' "$MESHCORE_TEST_HOST_WAYLAND" +else + printf 'libwayland-client.so.0 => not found\n' +fi +if [[ -e "$MESHCORE_TEST_APPDIR/usr/lib/libgpg-error.so.0" ]]; then + printf 'libgpg-error.so.0 => %s/usr/lib/libgpg-error.so.0 (0x0)\n' "$MESHCORE_TEST_APPDIR" +else + printf 'libgpg-error.so.0 => %s (0x0)\n' "$MESHCORE_TEST_HOST_LIBRARY" +fi +EOF +chmod +x "$temporary/fakebin/ldd" +MESHCORE_TEST_APPDIR="$temporary/audit-appdir" \ + MESHCORE_TEST_HOST_LIBRARY="$temporary/host/libgpg-error.so.0" \ + MESHCORE_TEST_HOST_WAYLAND="$temporary/host/libwayland-client.so.0" \ + PATH="$temporary/fakebin:$PATH" \ + bash "$project/scripts/appimage/dependencies.sh" bundle \ + "$temporary/audit-appdir" "$temporary/dependency-audit.log" +[[ -L "$temporary/audit-appdir/usr/lib/libgpg-error.so.0" ]] +[[ -f "$temporary/audit-appdir/usr/lib/libgpg-error.so.0.37.0" ]] +[[ ! -e "$temporary/audit-appdir/usr/lib/libwayland-client.so.0" ]] +grep -Fq 'libgpg-error.so.0 =>' "$temporary/dependency-audit.log" +grep -Fq 'libwayland-client.so.0 =>' "$temporary/dependency-audit.log" + +mkdir -p "$temporary/audit AppDir/usr/bin" "$temporary/audit AppDir/usr/lib" +cp "$temporary/audit-appdir/usr/bin/fixture" "$temporary/audit AppDir/usr/bin/fixture" +MESHCORE_TEST_APPDIR="$temporary/audit AppDir" \ + MESHCORE_TEST_HOST_LIBRARY="$temporary/host/libgpg-error.so.0" \ + MESHCORE_TEST_HOST_WAYLAND="$temporary/host/libwayland-client.so.0" \ + PATH="$temporary/fakebin:$PATH" \ + bash "$project/scripts/appimage/dependencies.sh" bundle \ + "$temporary/audit AppDir" "$temporary/dependency-audit-spaces.log" +[[ -L "$temporary/audit AppDir/usr/lib/libgpg-error.so.0" ]] +grep -Fq 'libgpg-error.so.0 =>' "$temporary/dependency-audit-spaces.log" + +mkdir -p "$temporary/audit-missing/usr/bin" "$temporary/audit-missing/usr/lib" +cp "$temporary/audit-appdir/usr/bin/fixture" "$temporary/audit-missing/usr/bin/fixture" +MESHCORE_TEST_APPDIR="$temporary/audit-missing" \ + MESHCORE_TEST_HOST_LIBRARY="$temporary/host/libgpg-error.so.0" \ + MESHCORE_TEST_HOST_WAYLAND="$temporary/host/missing-libwayland-client.so.0" \ + PATH="$temporary/fakebin:$PATH" \ + assert_fails bash "$project/scripts/appimage/dependencies.sh" audit \ + "$temporary/audit-missing" "$temporary/dependency-rejected.log" +grep -Fq 'unexpected host dependency' "$temporary/dependency-rejected.log" +grep -Fq 'libwayland-client.so.0 => NOT PRESENT ON AUDIT HOST [host interface]' \ + "$temporary/dependency-rejected.log" +MESHCORE_TEST_APPDIR="$temporary/audit-appdir" \ + MESHCORE_TEST_HOST_LIBRARY="$temporary/host/libgpg-error.so.0" \ + MESHCORE_TEST_HOST_WAYLAND="$temporary/host/libwayland-client.so.0" \ + MESHCORE_TEST_LDD_VERSION_FAILURE=1 \ + PATH="$temporary/fakebin:$PATH" \ + assert_fails bash "$project/scripts/appimage/dependencies.sh" audit \ + "$temporary/audit-appdir" "$temporary/dependency-version-rejected.log" +grep -Fq "version 'GLIBC_2.39' not found" "$temporary/error" + +mkdir -p "$temporary/launcher-appdir/usr/bin" +cp "$project/scripts/appimage/AppRun" "$temporary/launcher-appdir/AppRun" +cat > "$temporary/launcher-appdir/usr/bin/meshcore_open" <<'EOF' +#!/usr/bin/env bash +env | sort +EOF +chmod +x "$temporary/launcher-appdir/usr/bin/meshcore_open" +env APPDIR="$temporary/launcher-appdir" \ + GIO_EXTRA_MODULES=/host/gio/modules GIO_MODULE_DIR=/host/gio/modules \ + GI_TYPELIB_PATH=/host/girepository GTK_PATH=/host/gtk/modules \ + GTK_MODULES=host-module GDK_PIXBUF_MODULE_FILE=/host/pixbuf.loaders \ + bash "$temporary/launcher-appdir/AppRun" > "$temporary/launcher-environment" +for variable in GIO_EXTRA_MODULES GIO_MODULE_DIR GI_TYPELIB_PATH GTK_PATH \ + GTK_MODULES GDK_PIXBUF_MODULE_FILE; do + if grep -q "^$variable=" "$temporary/launcher-environment"; then + printf 'Host plugin environment leaked through AppRun: %s\n' "$variable" >&2 + exit 1 + fi +done + printf 'AppImage packaging contract tests passed\n' \ No newline at end of file diff --git a/scripts/appimage/test_runtime.sh b/scripts/appimage/test_runtime.sh index 3182ec5a..c09e60f1 100644 --- a/scripts/appimage/test_runtime.sh +++ b/scripts/appimage/test_runtime.sh @@ -4,6 +4,11 @@ set -euo pipefail image="$(realpath "$1")" mkdir -p "$2" output="$(realpath "$2")" +script_dir="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)" +dependency_checker="${MESHCORE_APPIMAGE_DEPENDENCIES:-$script_dir/dependencies.sh}" +if [[ "$dependency_checker" != /* ]]; then + dependency_checker="$(realpath -e -- "$dependency_checker")" +fi exec > >(tee -a "$output/runtime-test.log") 2>&1 log() { @@ -86,33 +91,21 @@ log "ELF architecture audit passed ($elf_count files)" dependencies="$output/dependencies.log" : > "$dependencies" -run_timed 'check application dependencies' 20s "$workspace/ldd.log" \ - ldd "$appdir/usr/bin/meshcore_open" -cat "$workspace/ldd.log" >> "$dependencies" -while IFS= read -r -d '' library; do - relative="${library#"$appdir/"}" - if run_timed "check dependencies: $relative" 20s "$workspace/ldd.log" ldd "$library"; then - cat "$workspace/ldd.log" >> "$dependencies" - else - status=$? - cat "$workspace/ldd.log" >> "$dependencies" - if [[ "$status" == 124 || "$status" == 137 ]]; then - exit "$status" - fi - log "ldd returned $status for $relative; continuing unresolved-dependency scan" - fi -done < <(find "$appdir/usr/bin/lib" "$appdir/usr/lib" -type f -name '*.so*' -print0) -if grep 'not found' "$dependencies"; then - log 'Unresolved AppImage dependencies' - exit 1 -fi -log 'Dependency audit passed' +[[ -f "$dependency_checker" ]] || { log "Missing dependency checker: $dependency_checker"; exit 1; } +run_timed 'audit dependency origins' 120s "$workspace/dependency-audit.log" \ + bash "$dependency_checker" audit "$appdir" "$dependencies" +cat "$workspace/dependency-audit.log" >> "$dependencies" +log 'Dependency origin audit passed' mkdir -p "$workspace/home/Documents" "$workspace/home/config" printf 'XDG_DOCUMENTS_DIR="%s/Documents"\n' "$workspace/home" > "$workspace/home/config/user-dirs.dirs" log 'Starting AppRun under a private D-Bus session (also used as the system bus)' # shellcheck disable=SC2016 -env -u LD_LIBRARY_PATH -u GTK_PATH -u GSETTINGS_SCHEMA_DIR \ +env -u LD_LIBRARY_PATH \ + GIO_EXTRA_MODULES=/host/gio/modules GIO_MODULE_DIR=/host/gio/modules \ + GI_TYPELIB_PATH=/host/girepository GTK_PATH=/host/gtk/modules \ + GTK_MODULES=host-module GDK_PIXBUF_MODULE_FILE=/host/pixbuf.loaders \ + GSETTINGS_SCHEMA_DIR=/host/glib-2.0/schemas \ HOME="$workspace/home" XDG_CONFIG_HOME="$workspace/home/config" \ XDG_DATA_HOME="$workspace/home/data" XDG_CACHE_HOME="$workspace/home/cache" \ dbus-run-session -- bash -c \ diff --git a/scripts/appimage/verify_image.sh b/scripts/appimage/verify_image.sh new file mode 100644 index 00000000..9ef2e385 --- /dev/null +++ b/scripts/appimage/verify_image.sh @@ -0,0 +1,22 @@ +#!/usr/bin/env bash +set -euo pipefail + +if [[ $# != 2 ]]; then + printf 'Usage: verify_image.sh APPIMAGE REPORT\n' >&2 + exit 2 +fi + +image="$(realpath -e -- "$1")" +report="$2" +dependency_checker="$(dirname "${BASH_SOURCE[0]}")/dependencies.sh" +workspace="$(mktemp -d)" +trap 'rm -rf "$workspace"' EXIT +mkdir -p "$(dirname "$report")" +cp -p -- "$image" "$workspace/extractor" +printf '\0\0\0' | dd of="$workspace/extractor" bs=1 seek=8 count=3 conv=notrunc status=none +( + cd "$workspace" + ./extractor --appimage-extract >/dev/null +) +bash "$dependency_checker" audit "$workspace/squashfs-root" "$report" +printf 'AppImage dependency audit passed: %s\n' "$report" \ No newline at end of file diff --git a/scripts/build_appimage.sh b/scripts/build_appimage.sh index 572e42a4..03b00c1a 100644 --- a/scripts/build_appimage.sh +++ b/scripts/build_appimage.sh @@ -156,6 +156,7 @@ package_direct() { dependencies+=(--deploy-deps-only "$library") done < <(find "$appdir/usr/bin/lib" -type f -print0) "$linuxdeploy" --appdir "$appdir" "${dependencies[@]}" + bash "$project/scripts/appimage/dependencies.sh" bundle "$appdir" "$work/dependency-audit.txt" while IFS= read -r -d '' library; do readelf -h "$library" >/dev/null 2>&1 || continue relative="$(realpath --relative-to="$(dirname "$library")" "$appdir/usr/lib")" @@ -187,6 +188,7 @@ package_direct() { cp "$MESHCORE_APPIMAGE_FLUTTER_ROOT/LICENSE" "$appdir/usr/share/doc/meshcore-open/Flutter-LICENSE" fi audit_appdir "$appdir" "$work/audit.txt" + cat "$work/dependency-audit.txt" >> "$work/audit.txt" ARCH="$appimage_arch" "$appimagetool" --runtime-file "$cache/runtime" --no-appstream \ "$appdir" "$work/$appimage_name" chmod +x "$work/$appimage_name" diff --git a/test/connector/advert_signature_test.dart b/test/connector/advert_signature_test.dart new file mode 100644 index 00000000..2be6c30f --- /dev/null +++ b/test/connector/advert_signature_test.dart @@ -0,0 +1,145 @@ +import 'dart:typed_data'; + +import 'package:cryptography/cryptography.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:meshcore_open/connector/meshcore_connector.dart'; +import 'package:meshcore_open/connector/meshcore_protocol.dart'; +import 'package:meshcore_open/storage/prefs_manager.dart'; +import 'package:meshcore_open/utils/advert_signature.dart'; +import 'package:shared_preferences/shared_preferences.dart'; + +/// Builds an advert payload signed the way MeshCore's Mesh::createAdvert does. +Future _signedAdvert( + int seedByte, { + required int type, + required String name, + int timestamp = 1700000000, +}) async { + final algo = Ed25519(); + final keys = await algo.newKeyPairFromSeed(List.filled(32, seedByte)); + final pub = (await keys.extractPublicKey()).bytes; + final ts = Uint8List(4) + ..buffer.asByteData().setUint32(0, timestamp, Endian.little); + final appData = [0x80 | type, ...name.codeUnits]; + final sig = await algo.sign([...pub, ...ts, ...appData], keyPair: keys); + return Uint8List.fromList([...pub, ...ts, ...sig.bytes, ...appData]); +} + +/// Wraps an advert payload in a PUSH_CODE_LOG_RX_DATA frame (flood, no path). +List _rxFrame(Uint8List payload) => [ + pushCodeLogRxData, + 0, // snr + 0, // rssi + (payloadTypeADVERT << 2) | 0x01, // header: flood route + 0, // path length + ...payload, +]; + +List _contactFrame(int code, List key, String name) { + final data = ByteData(1 + 32 + 3 + 64 + 32 + 4 + 12); + final bytes = data.buffer.asUint8List(); + bytes[0] = code; + bytes.setRange(1, 33, key); + bytes[33] = advTypeRepeater; + bytes[35] = 0xFF; + bytes.setRange(100, 100 + name.length, name.codeUnits); + data.setUint32(132, 1700000000, Endian.little); + return bytes; +} + +Future _settle() async { + for (var i = 0; i < 20; i++) { + await Future.delayed(Duration.zero); + } +} + +void main() { + TestWidgetsFlutterBinding.ensureInitialized(); + + setUp(() async { + SharedPreferences.setMockInitialValues({}); + PrefsManager.reset(); + await PrefsManager.initialize(); + }); + + group('verifyAdvertSignature', () { + for (final type in [ + advTypeChat, + advTypeRepeater, + advTypeRoom, + advTypeSensor, + ]) { + test('accepts a valid advert of type $type', () async { + final advert = await _signedAdvert( + type + 10, + type: type, + name: 'N$type', + ); + expect(await verifyAdvertSignature(advert), isTrue); + }); + } + + test('rejects tampered app data', () async { + final advert = await _signedAdvert(1, type: advTypeRepeater, name: 'Rpt'); + advert[advert.length - 1] ^= 0x01; + expect(await verifyAdvertSignature(advert), isFalse); + }); + + test('rejects a swapped public key', () async { + final advert = await _signedAdvert(2, type: advTypeChat, name: 'Bob'); + final other = await _signedAdvert(3, type: advTypeChat, name: 'Bob'); + advert.setRange(0, 32, other.sublist(0, 32)); + expect(await verifyAdvertSignature(advert), isFalse); + }); + + test('rejects a short payload', () async { + expect(await verifyAdvertSignature(Uint8List(99)), isFalse); + }); + }); + + group('RX advert handling', () { + test('valid advert is discovered', () async { + final connector = MeshCoreConnector(); + final advert = await _signedAdvert(4, type: advTypeRoom, name: 'Room'); + connector.handleFrameForTest(_rxFrame(advert)); + await _settle(); + expect(connector.discoveredContacts.map((c) => c.name), contains('Room')); + }); + + test('forged advert is dropped', () async { + final connector = MeshCoreConnector(); + final advert = await _signedAdvert( + 5, + type: advTypeRepeater, + name: 'Real', + ); + // Rename without re-signing. + advert.setRange(advert.length - 4, advert.length, 'Fake'.codeUnits); + connector.handleFrameForTest(_rxFrame(advert)); + await _settle(); + expect(connector.discoveredContacts, isEmpty); + }); + }); + + test('full contact sync forgets keys the radio dropped', () async { + final connector = MeshCoreConnector(); + final kept = List.generate(32, (i) => i + 1); + final dropped = List.generate(32, (i) => 100 + i); + + connector.handleFrameForTest([respCodeContactsStart, 0, 0, 0, 0]); + connector.handleFrameForTest(_contactFrame(respCodeContact, kept, 'Kept')); + connector.handleFrameForTest( + _contactFrame(respCodeContact, dropped, 'Gone'), + ); + connector.handleFrameForTest([respCodeEndOfContacts, 0, 0, 0, 0]); + expect(connector.knownContactKeys.length, 2); + + connector.handleFrameForTest([respCodeContactsStart, 0, 0, 0, 0]); + connector.handleFrameForTest(_contactFrame(respCodeContact, kept, 'Kept')); + connector.handleFrameForTest([respCodeEndOfContacts, 0, 0, 0, 0]); + await _settle(); + + expect(connector.contacts.map((c) => c.name), ['Kept']); + expect(connector.knownContactKeys, hasLength(1)); + }); +} diff --git a/test/theme/snack_bar_action_test.dart b/test/theme/snack_bar_action_test.dart new file mode 100644 index 00000000..6defe595 --- /dev/null +++ b/test/theme/snack_bar_action_test.dart @@ -0,0 +1,57 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:meshcore_open/theme/mesh_theme.dart'; + +double _contrast(Color a, Color b) { + final la = a.computeLuminance(); + final lb = b.computeLuminance(); + final hi = la > lb ? la : lb; + final lo = la > lb ? lb : la; + return (hi + 0.05) / (lo + 0.05); +} + +void main() { + test('snackbar action text is readable in light and dark themes', () { + for (final theme in [MeshTheme.light(), MeshTheme.dark()]) { + final sb = theme.snackBarTheme; + expect(sb.actionTextColor, isNotNull); + expect( + _contrast(sb.actionTextColor!, sb.backgroundColor!), + greaterThanOrEqualTo(4.5), + ); + } + }); + + testWidgets('snackbar with action and persist:false auto-dismisses', ( + tester, + ) async { + late BuildContext ctx; + await tester.pumpWidget( + MaterialApp( + theme: MeshTheme.light(), + home: Scaffold( + body: Builder( + builder: (c) { + ctx = c; + return const SizedBox(); + }, + ), + ), + ), + ); + ScaffoldMessenger.of(ctx).showSnackBar( + SnackBar( + content: const Text('Rule deleted'), + duration: const Duration(seconds: 6), + persist: false, + action: SnackBarAction(label: 'Undo', onPressed: () {}), + ), + ); + await tester.pump(); + await tester.pump(const Duration(milliseconds: 500)); + expect(find.text('Rule deleted'), findsOneWidget); + await tester.pump(const Duration(seconds: 7)); + await tester.pumpAndSettle(); + expect(find.text('Rule deleted'), findsNothing); + }); +} diff --git a/test/widgets/filter_rule_dialog_test.dart b/test/widgets/filter_rule_dialog_test.dart new file mode 100644 index 00000000..4084fc6e --- /dev/null +++ b/test/widgets/filter_rule_dialog_test.dart @@ -0,0 +1,48 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:meshcore_open/l10n/app_localizations.dart'; +import 'package:meshcore_open/widgets/filter_rule_dialog.dart'; + +void main() { + for (final scale in [1.0, 2.0]) { + testWidgets('floating label is not clipped with keyboard (scale $scale)', ( + tester, + ) async { + tester.view.physicalSize = const Size(1080, 1400); + tester.view.devicePixelRatio = 2.75; + addTearDown(tester.view.reset); + + await tester.pumpWidget( + MaterialApp( + localizationsDelegates: AppLocalizations.localizationsDelegates, + supportedLocales: AppLocalizations.supportedLocales, + builder: (context, child) { + final mq = MediaQuery.of(context); + return MediaQuery( + data: mq.copyWith( + textScaler: TextScaler.linear(scale), + viewInsets: const EdgeInsets.only(bottom: 150), + ), + child: child!, + ); + }, + home: Builder( + builder: (context) => TextButton( + onPressed: () => showFilterRuleDialog(context), + child: const Text('open'), + ), + ), + ), + ); + await tester.tap(find.text('open')); + await tester.pumpAndSettle(); + + final scrollRect = tester.getRect(find.byType(SingleChildScrollView)); + final labelRect = tester.getRect(find.byType(InputDecorator)); + // The floating label sits above the field box; the scroll viewport must + // start above the field with room for it. + final fieldTop = labelRect.top; + expect(fieldTop - scrollRect.top, greaterThanOrEqualTo(8 * scale)); + }); + } +}