Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bca67fd7 authored by Jeff Vander Stoep's avatar Jeff Vander Stoep Committed by Android Git Automerger
Browse files

am 9aaf54ee: am 71b19fc3: am 5ba31e6e: am bba79795: am 25c866a8: am e2adb1ff:...

am 9aaf54ee: am 71b19fc3: am 5ba31e6e: am bba79795: am 25c866a8: am e2adb1ff: Merge "Sanity-check paths of files to be restored" into jb-mr2-dev

* commit '9aaf54ee':
  Sanity-check paths of files to be restored
parents bbf7e4af 9aaf54ee
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -3595,6 +3595,14 @@ public class BackupManagerService extends IBackupManager.Stub {
                                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
                        // data to the agent.
                        if (DEBUG && okay && mAgent != null) {