currently crash_sender.sh has a helper to validate the .meta file:
# Make sure the file is sane. If the disk was corrupted, we should just delete.
is_valid_metadata() {
# Delete comments, blank lines, and lines that start with valid keys.
# We allow underscores, dashes, and periods as Chrome uses them.
# https://crbug.com/821530
[ -z "$(sed -E -e '/^#/d' -e '/^$/d' -e '/^[a-zA-Z0-9_.-]+=/d' "$1")" ]
}
this implicitly validates filenames too. as we move crash_sender.sh into C++, we should reuse this to validate the metadata entries as we write them.
e.g. CrashCollector::AddCrashMetaUploadFile should call this func instead of just checking for a / in the argument.
Comment 1 Deleted