application-id in delta-chat-auth-scheme is optional

This commit is contained in:
B. Petersen
2019-02-20 23:11:57 +01:00
parent be6a556b87
commit b8a1646823
2 changed files with 2 additions and 1 deletions
+1
View File
@@ -182,6 +182,7 @@
<!-- this scheme is used as the redirect_url for getOauth2Url()
and should be whitelisted by the supported oauth2 services -->
<data android:scheme="chat.delta" android:path="/${applicationId}/auth" tools:ignore="AppLinkUrlError"/>
<data android:scheme="chat.delta" android:path="/auth" tools:ignore="AppLinkUrlError"/>
</intent-filter>
</activity>
@@ -253,7 +253,7 @@ public class RegistrationActivity extends BaseActionBarActivity implements DcEve
if(Intent.ACTION_VIEW.equals(intent.getAction())) {
Uri uri = intent.getData();
String path = uri.getPath();
if(!path.startsWith("/"+BuildConfig.APPLICATION_ID)
if(!(path.startsWith("/"+BuildConfig.APPLICATION_ID)||path.startsWith("/auth"))
|| System.currentTimeMillis()-oauth2Requested > 3*60*60*1000) {
return; // timeout after some hours or a request belonging to a bad path.
}