summaryrefslogtreecommitdiff
path: root/native/android/configuration.cpp
diff options
context:
space:
mode:
author Tetiana Meronyk <tetianameronyk@google.com> 2023-08-24 16:27:30 +0000
committer Tetiana Meronyk <tetianameronyk@google.com> 2023-10-06 12:34:06 +0000
commit1bc8e28626843225b09b2b070685f81fbadefc08 (patch)
tree4e63265e80a9ff1240033aa2e91c37c5c2e0ce9b /native/android/configuration.cpp
parent981a4dcd4259fb60139bfb391ee409ec302e60fa (diff)
Truncate user data to a limit of 500 characters
Fix vulnerability that allows creating users with no restrictions. This is done by creating an intent to create a user and putting extras that are too long to be serialized. It causes IOException and the restrictions are not written in the file. By truncating the string values when writing them to the file, we ensure that the exception does not happen and it can be recorded correctly. Bug: 293602317 Test: install app provided in the bug, open app and click add. Check logcat to see there is no more IOException. Reboot the device by either opening User details page or running adb shell dumpsys user | grep -A12 heen and see that the restrictions are in place. Change-Id: I633dc10974a64ef2abd07e67ff2d209847129989 Merged-In: I633dc10974a64ef2abd07e67ff2d209847129989
Diffstat (limited to 'native/android/configuration.cpp')
0 files changed, 0 insertions, 0 deletions