A newly hired Android developer learns that the app uses FileProvider to share files with other apps. They change the FileProvider paths configuration to path="." (root of internal storage). What security risk has been introduced?
- A.A) Setting path="." causes FileProvider to throw an IllegalArgumentException at runtime, crashing the app
- B.B) path="." grants the FileProvider access to the entire internal storage root, meaning any file in the app's internal storage can be shared via a content URI - including sensitive databases, SharedPreferences XML files, and private keys
- C.C) path="." is the most secure setting because it restricts sharing to the application root and prevents traversal to parent directories
- D.D) The FileProvider path setting only affects which files are backed up; it does not change which files can be shared
Why B is correct