diff options
author | mnissler@chromium.org <mnissler@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-22 14:58:40 +0000 |
---|---|---|
committer | mnissler@chromium.org <mnissler@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-22 14:58:40 +0000 |
commit | eade59adc1d2170cfd1b329ee1b1064102929feb (patch) | |
tree | 95227e619346cce183b2cfdbcae61bc71221402e /net/tools | |
parent | 737c439fbd7975807f67bb10c4fdb33a62892156 (diff) | |
download | chromium_src-eade59adc1d2170cfd1b329ee1b1064102929feb.zip chromium_src-eade59adc1d2170cfd1b329ee1b1064102929feb.tar.gz chromium_src-eade59adc1d2170cfd1b329ee1b1064102929feb.tar.bz2 |
Always send the device ID when making device management requests.
While at it, clean up use of policy constants.
BUG=62060
TEST=Compiles and passes existing tests.
Review URL: http://codereview.chromium.org/5162006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66949 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/tools')
-rw-r--r-- | net/tools/testserver/device_management.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/net/tools/testserver/device_management.py b/net/tools/testserver/device_management.py index aec323a..d715227 100644 --- a/net/tools/testserver/device_management.py +++ b/net/tools/testserver/device_management.py @@ -227,13 +227,15 @@ class RequestHandler(object): """ error = None dmtoken = None + request_device_id = self.GetUniqueParam('deviceid') match = re.match('GoogleDMToken token=(\\w+)', self._headers.getheader('Authorization', '')) if match: dmtoken = match.group(1) if not dmtoken: error = dm.DeviceManagementResponse.DEVICE_MANAGEMENT_TOKEN_INVALID - elif not self._server.LookupDevice(dmtoken): + elif (not request_device_id or + not self._server.LookupDevice(dmtoken) == request_device_id): error = dm.DeviceManagementResponse.DEVICE_NOT_FOUND else: return (dmtoken, None) |