mirror of
https://github.com/ArcaneChat/android.git
synced 2026-07-03 14:05:24 +02:00
application-id in delta-chat-auth-scheme is optional
This commit is contained in:
@@ -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.
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user