mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-21 00:59:49 +01:00
Fix path escaping issues.
Acknowledgment to Mouad & Ostorlab team for bringing this to our attention.
This commit is contained in:
committed by
Greyson Parrelli
parent
2767e298c4
commit
efa9dd6ec3
@@ -349,7 +349,7 @@ public class BlobProvider {
|
||||
|
||||
private static @Nullable String getId(@NonNull Uri uri) {
|
||||
if (isAuthority(uri)) {
|
||||
return uri.getPathSegments().get(ID_PATH_SEGMENT);
|
||||
return Uri.encode(uri.getPathSegments().get(ID_PATH_SEGMENT));
|
||||
}
|
||||
return null;
|
||||
}
|
||||
@@ -422,7 +422,7 @@ public class BlobProvider {
|
||||
}
|
||||
|
||||
private static @NonNull String buildFileName(@NonNull String id) {
|
||||
return id + ".blob";
|
||||
return Uri.encode(id) + ".blob";
|
||||
}
|
||||
|
||||
private static @NonNull String getDirectory(@NonNull StorageType storageType) {
|
||||
|
||||
Reference in New Issue
Block a user