Chromium Code Reviews| Index: chrome/browser/chromeos/settings/session_manager_operation.cc |
| diff --git a/chrome/browser/chromeos/settings/session_manager_operation.cc b/chrome/browser/chromeos/settings/session_manager_operation.cc |
| index c4fc8d132051ae0c9f17b39f5d03c3f8f14bc4db..5952a7d06774e55c0d19ba324f9ed6efd5b64f5b 100644 |
| --- a/chrome/browser/chromeos/settings/session_manager_operation.cc |
| +++ b/chrome/browser/chromeos/settings/session_manager_operation.cc |
| @@ -162,15 +162,23 @@ void SessionManagerOperation::ValidateDeviceSettings( |
| policy::DeviceCloudPolicyValidator::Create(policy.Pass(), |
| background_task_runner); |
| - // Policy auto-generated by session manager doesn't include a timestamp, so we |
| - // need to allow missing timestamps. |
| - const bool require_timestamp = |
| - policy_data_.get() && policy_data_->has_request_token(); |
| + |
| + // Policy auto-generated by session manager doesn't include a timestamp, so |
| + // the timestamp shouldn't be verified in that case. |
| + // |
| + // Additionally, offline devices can get their clock set backwards in time |
| + // under some hardware conditions; checking the timestamp now could likely |
| + // find a value in the future, and prevent the user from signing-in or |
| + // starting guest mode. Tlsdate will eventually fix the clock when the device |
| + // is back online, but the network configuration may come from device ONC. |
| + // |
| + // To prevent all of these issues the timestamp is just not verified when |
| + // loading the device policy from the cache. Note that the timestamp is still |
| + // verified during enrollment and when a new policy if fetched from the |
|
bartfab (slow)
2013/11/06 17:53:51
Nit: s/if/is/
|
| + // server. |
| validator->ValidateAgainstCurrentPolicy( |
| policy_data_.get(), |
| - require_timestamp ? |
| - policy::CloudPolicyValidatorBase::TIMESTAMP_REQUIRED : |
| - policy::CloudPolicyValidatorBase::TIMESTAMP_NOT_REQUIRED, |
| + policy::CloudPolicyValidatorBase::TIMESTAMP_NOT_REQUIRED, |
| policy::CloudPolicyValidatorBase::DM_TOKEN_NOT_REQUIRED); |
| validator->ValidatePolicyType(policy::dm_protocol::kChromeDevicePolicyType); |
| validator->ValidatePayload(); |