handle intent exceptions to prevent denial of service (#1458)

This commit is contained in:
Matt Portune 2021-07-12 12:31:39 -04:00 committed by GitHub
parent d8e68a266c
commit 172a857604
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -155,6 +155,8 @@ namespace Bit.Droid
protected override void OnNewIntent(Intent intent)
{
base.OnNewIntent(intent);
try
{
if (intent.GetBooleanExtra("generatorTile", false))
{
_messagingService.Send("popAllAndGoToTabGenerator");
@ -184,6 +186,11 @@ namespace Bit.Droid
ParseYubiKey(intent.DataString);
}
}
catch (Exception e)
{
System.Diagnostics.Debug.WriteLine(">>> {0}: {1}", e.GetType(), e.StackTrace);
}
}
public async override void OnRequestPermissionsResult(int requestCode, string[] permissions,
[GeneratedEnum] Permission[] grantResults)