am 5ba31e6e: am bba79795: am 25c866a8: am e2adb1ff: Merge "Sanity-check paths of files to be restored" into jb-mr2-dev
* commit '5ba31e6e9afb34781fe5b927354502d9c6190bc5': Sanity-check paths of files to be restored
This commit is contained in:
@@ -3578,6 +3578,14 @@ class BackupManagerService extends IBackupManager.Stub {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// The path needs to be canonical
|
||||||
|
if (info.path.contains("..") || info.path.contains("//")) {
|
||||||
|
if (MORE_DEBUG) {
|
||||||
|
Slog.w(TAG, "Dropping invalid path " + info.path);
|
||||||
|
}
|
||||||
|
okay = false;
|
||||||
|
}
|
||||||
|
|
||||||
// If the policy is satisfied, go ahead and set up to pipe the
|
// If the policy is satisfied, go ahead and set up to pipe the
|
||||||
// data to the agent.
|
// data to the agent.
|
||||||
if (DEBUG && okay && mAgent != null) {
|
if (DEBUG && okay && mAgent != null) {
|
||||||
|
|||||||
Reference in New Issue
Block a user