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): ...@@ -278,8 +278,7 @@ class PolicyRequestHandler(BaseHTTPServer.BaseHTTPRequestHandler):
# device_management_backend.proto. # device_management_backend.proto.
if (self.GetUniqueParam('devicetype') != '2' or if (self.GetUniqueParam('devicetype') != '2' or
self.GetUniqueParam('apptype') != 'Chrome' or self.GetUniqueParam('apptype') != 'Chrome' or
len(self.GetUniqueParam('deviceid')) >= 64 or len(self.GetUniqueParam('deviceid')) >= 64):
len(self.GetUniqueParam('agent')) >= 64):
return (400, 'Invalid request parameter') return (400, 'Invalid request parameter')
if request_type == 'register': if request_type == 'register':
response = self.ProcessRegister(rmsg.register_request) response = self.ProcessRegister(rmsg.register_request)
......
...@@ -643,7 +643,7 @@ message DeviceStateRetrievalResponse { ...@@ -643,7 +643,7 @@ message DeviceStateRetrievalResponse {
// * devicetype: MUST BE "1" for Android or "2" for Chrome OS. // * devicetype: MUST BE "1" for Android or "2" for Chrome OS.
// * apptype: MUST BE Android or Chrome. // * apptype: MUST BE Android or Chrome.
// * deviceid: MUST BE no more than 64-char in [\x21-\x7E]. // * 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: // * HTTP Authorization header MUST be in the following formats:
// * For register and ping requests // * For register and ping requests
// Authorization: GoogleLogin auth=<auth cookie for Mobile Sync> // 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