mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 18:40:39 +00:00
Check for null query when decoding device link uri
This commit is contained in:
parent
263fdceb94
commit
6c8a1ff3d3
1 changed files with 6 additions and 1 deletions
|
@ -21,7 +21,12 @@ public class DeviceLinkInfo {
|
|||
final ECPublicKey deviceKey;
|
||||
|
||||
public static DeviceLinkInfo parseDeviceLinkUri(URI linkUri) throws IOException, InvalidKeyException {
|
||||
Map<String, String> query = getQueryMap(linkUri.getRawQuery());
|
||||
final String rawQuery = linkUri.getRawQuery();
|
||||
if (isEmpty(rawQuery)) {
|
||||
throw new RuntimeException("Invalid device link uri");
|
||||
}
|
||||
|
||||
Map<String, String> query = getQueryMap(rawQuery);
|
||||
String deviceIdentifier = query.get("uuid");
|
||||
String publicKeyEncoded = query.get("pub_key");
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue