Make base::ReadFileToString() return false on I/O error.

It seems inconsistent that ReadFileToString() currently returns false when encountering a file open error but true upon file read error.  This CL forces the return value to false upon encountering any kind of error and documents this behaviour.

At that occasion, a test for path traversal prevention is added.

BUG=none

Review URL: https://codereview.chromium.org/254333002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@267507 0039d316-1c4b-4281-b951-d872f2087c98


CrOS-Libchrome-Original-Commit: 731daa1a55f46d844aeb6d5d0ffbb8242c39d7b9
3 files changed
tree: 804ff0a3959c753cc14d52e814c9c20845f8499b
  1. base/
  2. build/
  3. components/
  4. dbus/
  5. device/
  6. ipc/
  7. mojo/
  8. testing/
  9. third_party/
  10. ui/