New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 844521 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: May 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug



Sign in to add a comment

Reject Policy Printers with invalid Uri

Project Member Reported by skau@chromium.org, May 18 2018

Issue description

We can receive printers with invalid uris in policy json. CUPS rejects the printer when we try to set it up.  But this causes a mysterious failure for the user.  Reject the printer on policy parsing so we have more obvious breakage.
 

Comment 1 by skau@chromium.org, May 18 2018

Labels: M-68
Project Member

Comment 2 by bugdroid1@chromium.org, May 23 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ff2bbe73f9d836d6b21cc2fe7e0de06ac08ac0dd

commit ff2bbe73f9d836d6b21cc2fe7e0de06ac08ac0dd
Author: Sean Kau <skau@chromium.org>
Date: Wed May 23 01:05:02 2018

Modify ParseUri to validate uris.

Parse uri verifies that if a port is provided, it has a valid value.
We accept empty paths.  We also validate that there is a valid scheme
value is provided if it is found.  These requirements are now validated
via unit test.

Bug:  844521 
Change-Id: I4fb28a5bba8e6bea9ac9a0bb2e6b4de21351d892
Reviewed-on: https://chromium-review.googlesource.com/1066949
Commit-Queue: Sean Kau <skau@chromium.org>
Reviewed-by: Xiaoqian Dai <xdai@chromium.org>
Cr-Commit-Position: refs/heads/master@{#560869}
[modify] https://crrev.com/ff2bbe73f9d836d6b21cc2fe7e0de06ac08ac0dd/chromeos/BUILD.gn
[modify] https://crrev.com/ff2bbe73f9d836d6b21cc2fe7e0de06ac08ac0dd/chromeos/printing/printer_configuration.cc
[add] https://crrev.com/ff2bbe73f9d836d6b21cc2fe7e0de06ac08ac0dd/chromeos/printing/printer_configuration_unittest.cc

Project Member

Comment 3 by bugdroid1@chromium.org, May 23 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5044d2a4d9b098284067cacf9e6ea78ee8e03af9

commit 5044d2a4d9b098284067cacf9e6ea78ee8e03af9
Author: Sean Kau <skau@chromium.org>
Date: Wed May 23 03:07:41 2018

Reject printers with invalid uri when parsing JSON.

Previous behavior was to accept the uri and CUPS would reject it when we
try to use it.  Received a report of this happening in TT.
This will help to surface the root cause for users.

Bug:  844521 
Change-Id: I77a20232a7317ee40c7c3c0fa534d73d9aad2b4b
Reviewed-on: https://chromium-review.googlesource.com/1066392
Commit-Queue: Sean Kau <skau@chromium.org>
Reviewed-by: Xiaoqian Dai <xdai@chromium.org>
Cr-Commit-Position: refs/heads/master@{#560912}
[modify] https://crrev.com/5044d2a4d9b098284067cacf9e6ea78ee8e03af9/chromeos/printing/printer_translator.cc
[modify] https://crrev.com/5044d2a4d9b098284067cacf9e6ea78ee8e03af9/chromeos/printing/printer_translator_unittest.cc

Comment 4 by skau@chromium.org, May 23 2018

Status: Fixed (was: Started)

Sign in to add a comment