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

Commit 1bfcf786 authored by Jean-Baptiste Queru's avatar Jean-Baptiste Queru Committed by Android Git Automerger
Browse files

am c726eb9c: Merge "Sanitise Bluetooth file name hint when receiving a contact"

* commit 'c726eb9c':
  Sanitise Bluetooth file name hint when receiving a contact
parents 43150c2d c726eb9c
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -244,6 +244,11 @@ public class BluetoothOppReceiveFileInfo {
            // Prevent abuse of path backslashes by converting all backlashes '\\' chars
            // to UNIX-style forward-slashes '/'
            hint = hint.replace('\\', '/');
            // Convert all whitespace characters to spaces.
            hint = hint.replaceAll("\\s", " ");
            // Replace illegal fat filesystem characters from the
            // filename hint i.e. :"<>*?| with something safe.
            hint = hint.replaceAll("[:\"<>*?|]", "_");
            if (V) Log.v(Constants.TAG, "getting filename from hint");
            int index = hint.lastIndexOf('/') + 1;
            if (index > 0) {