Commit a4b8fb8f authored by bartfab's avatar bartfab Committed by Commit bot

Drop 64 character limit in DeviceManagementRequest |agent| parameter

The HTTP POST |agent| parameter sent with a DeviceManagementRequest is
limited to 64 characters. After the git migration, Chrome includes its
git revision in the |agent|, making it longer than 64 characters.

This CL removes the arbitrary 64 character limit. This solution should be
considered temporary, until we have verified that the DMServer can handle
|agents| longer than 64 characters. If not, we will restore this limit and
change the construction of the string so that it never exceeds 64
characters.

BUG=406948
TEST=Browser tests no longer fail when the |agent| string is too long

Review URL: https://codereview.chromium.org/500013002

Cr-Commit-Position: refs/heads/master@{#291672}
parent 147bd4c5
......@@ -278,8 +278,7 @@ class PolicyRequestHandler(BaseHTTPServer.BaseHTTPRequestHandler):
# device_management_backend.proto.
if (self.GetUniqueParam('devicetype') != '2' or
self.GetUniqueParam('apptype') != 'Chrome' or
len(self.GetUniqueParam('deviceid')) >= 64 or
len(self.GetUniqueParam('agent')) >= 64):
len(self.GetUniqueParam('deviceid')) >= 64):
return (400, 'Invalid request parameter')
if request_type == 'register':
response = self.ProcessRegister(rmsg.register_request)
......
......@@ -325,10 +325,10 @@ message PolicyFetchResponse {
// public key on the client). If DMServer is unable to find matching key, it
// will return an error instead of policy data.
// In case hash was not specified, DMServer will leave verification signature
// field empty (legacy behavior).
// field empty (legacy behavior).
// In addition to the checks between new_public_key
// and new_public_key_signature described above, Chrome also verifies
// new_public_key with the embedded public key and
// new_public_key with the embedded public key and
// new_public_key_verification_signature.
optional bytes new_public_key_verification_signature = 7;
}
......@@ -643,7 +643,7 @@ message DeviceStateRetrievalResponse {
// * devicetype: MUST BE "1" for Android or "2" for Chrome OS.
// * apptype: MUST BE Android or Chrome.
// * deviceid: MUST BE no more than 64-char in [\x21-\x7E].
// * agent: MUST BE no more than 64-char long.
// * agent: MUST BE a string of characters.
// * HTTP Authorization header MUST be in the following formats:
// * For register and ping requests
// Authorization: GoogleLogin auth=<auth cookie for Mobile Sync>
......
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