| Index: components/os_crypt/os_crypt_posix.cc
|
| diff --git a/components/os_crypt/os_crypt_posix.cc b/components/os_crypt/os_crypt_posix.cc
|
| index 44f04b3801fead7d45d2758260c9721db6bf9334..24a411e9bd6b1461e4f942f0723ed97b8eaa22e3 100644
|
| --- a/components/os_crypt/os_crypt_posix.cc
|
| +++ b/components/os_crypt/os_crypt_posix.cc
|
| @@ -9,6 +9,7 @@
|
| #include <memory>
|
|
|
| #include "base/logging.h"
|
| +#include "base/strings/string_util.h"
|
| #include "base/strings/utf_string_conversions.h"
|
| #include "crypto/encryptor.h"
|
| #include "crypto/symmetric_key.h"
|
| @@ -118,7 +119,8 @@
|
| // old data saved as clear text and we'll return it directly.
|
| // Credit card numbers are current legacy data, so false match with prefix
|
| // won't happen.
|
| - if (ciphertext.find(kObfuscationPrefix) != 0) {
|
| + if (!base::StartsWith(ciphertext, kObfuscationPrefix,
|
| + base::CompareCase::SENSITIVE)) {
|
| *plaintext = ciphertext;
|
| return true;
|
| }
|
|
|