Reject malformed channel QR links and document channel QR scanning
A name with invalid percent-encoding (e.g. name=%FF) made Uri.queryParameters throw from the scanner's validator. The parser now returns null for it, with a regression test. Update the channels and additional-features guides for the renamed "Scan a QR Code" option, the supported channel link format, and its limits.
This commit is contained in:
1 parent
b1e968e7bf
commit
f58a76904a
4 files changed
+27
-8
No files matched your search
@@ -52,6 +52,12 @@ void main() {
|
||||
isNull,
|
||||
);
|
||||
expect(parseChannelQr('https://ipnt.uk/channels'), isNull);
|
||||
expect(
|
||||
parseChannelQr(
|
||||
'meshcore://channel/add?name=%FF&secret=8b3387e9c5cdea6ac9e5edbaa115cd72',
|
||||
),
|
||||
isNull,
|
||||
);
|
||||
expect(parseChannelQr('{"type":"meshcore_community"}'), isNull);
|
||||
expect(parseChannelQr(''), isNull);
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user