Commit 1f8404dc authored by Eric Willigers's avatar Eric Willigers Committed by Commit Bot

WebShare: Log the type of rejected files

Web Share has an accept list for MIME types and file extensions.

When a file share attempt fails because a file has a MIME type or
extension not an accept list, we now log an error.

BUG=965461

Change-Id: Ic860ba6842c5fe1cf09bad3de9a4f3e99ce304e2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1623656
Auto-Submit: Eric Willigers <ericwilligers@chromium.org>
Reviewed-by: default avatarTed Choc <tedchoc@chromium.org>
Reviewed-by: default avatarRaymes Khoury <raymes@chromium.org>
Commit-Queue: Eric Willigers <ericwilligers@chromium.org>
Cr-Commit-Position: refs/heads/master@{#662838}
parent 956058ab
......@@ -200,6 +200,9 @@ public class ShareServiceImpl implements ShareService {
for (SharedFile file : files) {
if (isDangerousFilename(file.name) || isDangerousMimeType(file.blob.contentType)) {
Log.i(TAG,
"Cannot share potentially dangerous \"" + file.blob.contentType
+ "\" file \"" + file.name + "\".");
callback.call(ShareError.PERMISSION_DENIED);
return;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment