Commit 85363f37 authored by Vadym Doroshenko's avatar Vadym Doroshenko Committed by Commit Bot

Do not fill credentials if the page url is not trusted.

Bug: 1014583
Change-Id: I687791397584b780d46b7674abe337a0fb72d5b2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1899780Reviewed-by: default avatarVasilii Sukhanov <vasilii@chromium.org>
Commit-Queue: Vadym Doroshenko <dvadym@chromium.org>
Cr-Commit-Position: refs/heads/master@{#712613}
parent ba1a9938
...@@ -335,6 +335,8 @@ NSString* const kSuggestionSuffix = @" ••••••••"; ...@@ -335,6 +335,8 @@ NSString* const kSuggestionSuffix = @" ••••••••";
webState:(web::WebState*)webState webState:(web::WebState*)webState
completionHandler: completionHandler:
(SuggestionsAvailableCompletion)completion { (SuggestionsAvailableCompletion)completion {
if (!GetPageURLAndCheckTrustLevel(webState, nullptr))
return;
[self.suggestionHelper [self.suggestionHelper
checkIfSuggestionsAvailableForForm:formName checkIfSuggestionsAvailableForForm:formName
fieldIdentifier:fieldIdentifier fieldIdentifier:fieldIdentifier
...@@ -385,7 +387,8 @@ NSString* const kSuggestionSuffix = @" ••••••••"; ...@@ -385,7 +387,8 @@ NSString* const kSuggestionSuffix = @" ••••••••";
frameID:(NSString*)frameID frameID:(NSString*)frameID
webState:(web::WebState*)webState webState:(web::WebState*)webState
completionHandler:(SuggestionsReadyCompletion)completion { completionHandler:(SuggestionsReadyCompletion)completion {
DCHECK(GetPageURLAndCheckTrustLevel(webState, nullptr)); if (!GetPageURLAndCheckTrustLevel(webState, nullptr))
return;
NSArray<FormSuggestion*>* rawSuggestions = NSArray<FormSuggestion*>* rawSuggestions =
[self.suggestionHelper retrieveSuggestionsWithFormName:formName [self.suggestionHelper retrieveSuggestionsWithFormName:formName
fieldIdentifier:fieldIdentifier fieldIdentifier:fieldIdentifier
......
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