token-import: handle empty urls better
This commit is contained in:
@@ -589,7 +589,7 @@ public class SecurityTokenHelper {
|
|||||||
|
|
||||||
public String getUrl() throws IOException {
|
public String getUrl() throws IOException {
|
||||||
byte[] data = getData(0x5F, 0x50);
|
byte[] data = getData(0x5F, 0x50);
|
||||||
return new String(data);
|
return new String(data).trim();
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getUserId() throws IOException {
|
public String getUserId() throws IOException {
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ import android.net.Uri;
|
|||||||
import android.os.SystemClock;
|
import android.os.SystemClock;
|
||||||
import android.support.annotation.Nullable;
|
import android.support.annotation.Nullable;
|
||||||
import android.support.v4.content.AsyncTaskLoader;
|
import android.support.v4.content.AsyncTaskLoader;
|
||||||
|
import android.text.TextUtils;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
import com.google.auto.value.AutoValue;
|
import com.google.auto.value.AutoValue;
|
||||||
@@ -159,7 +160,7 @@ public abstract class PublicKeyRetrievalLoader extends AsyncTaskLoader<KeyRetrie
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
log.add(LogType.MSG_RET_URI_START, 0);
|
log.add(LogType.MSG_RET_URI_START, 0);
|
||||||
if (tokenUri == null) {
|
if (TextUtils.isEmpty(tokenUri)) {
|
||||||
log.add(LogType.MSG_RET_URI_NULL, 1);
|
log.add(LogType.MSG_RET_URI_NULL, 1);
|
||||||
return KeyRetrievalResult.createWithError(log);
|
return KeyRetrievalResult.createWithError(log);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user