Skip to content
This repository has been archived by the owner on Sep 21, 2021. It is now read-only.

Commit

Permalink
fix(enroll): validate if base64 decode fail
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelje authored and Hector Rondon committed Nov 2, 2017
1 parent 3a722dd commit 59d09b3
Showing 1 changed file with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,16 @@ protected void onCreate(Bundle savedInstanceState) {
Intent intent = getIntent();
Uri data = intent.getData();

String deepLinkData = Helpers.base64decode(data.getQueryParameter("data"));
String deepLinkErrorMessage = getResources().getString(R.string.ERROR_DEEP_LINK);
String deepLinkData;

try {
deepLinkData = Helpers.base64decode(data.getQueryParameter("data"));
} catch(Exception ex) {
showError( deepLinkErrorMessage );
FlyveLog.e(deepLinkErrorMessage + " - " + ex.getMessage());
return;
}

String url;
String userToken;
Expand All @@ -96,7 +105,6 @@ protected void onCreate(Bundle savedInstanceState) {
String phone;
String website;
String email;
String deepLinkErrorMessage = getResources().getString(R.string.ERROR_DEEP_LINK);

try {
// CSV comma-separated values format
Expand Down

0 comments on commit 59d09b3

Please sign in to comment.