Limit max input length of printer address to 63 characters.

- Fixes a regression where users were able to type in >63 characters,
  exceeding the maximum length allowed for a printer address.
- According to RFC, 63 characters is the max length allowed for a
  hostname.

Bug: 963856
Test: End to End manual
Change-Id: I0d2e8a224755037a027422c11b9b5e4f5d05fa92
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1620600
Reviewed-by: Bailey Berro <baileyberro@chromium.org>
Reviewed-by: Steven Bennetts <stevenjb@chromium.org>
Commit-Queue: jimmy gong <jimmyxgong@chromium.org>
Cr-Commit-Position: refs/heads/master@{#662899}
diff --git a/chrome/browser/resources/settings/printing_page/cups_add_printer_dialog.html b/chrome/browser/resources/settings/printing_page/cups_add_printer_dialog.html
index af3d2d2f..fd6fdef 100644
--- a/chrome/browser/resources/settings/printing_page/cups_add_printer_dialog.html
+++ b/chrome/browser/resources/settings/printing_page/cups_add_printer_dialog.html
@@ -117,7 +117,7 @@
         </div>
         <div class="settings-box two-line">
           <cr-input id="printerAddressInput" label="$i18n{printerAddress}"
-              value="{{newPrinter.printerAddress}}" maxlength=128>
+              value="{{newPrinter.printerAddress}}" maxlength=63>
           </cr-input>
         </div>
         <div class="settings-box two-line">
diff --git a/chrome/browser/resources/settings/printing_page/cups_edit_printer_dialog.html b/chrome/browser/resources/settings/printing_page/cups_edit_printer_dialog.html
index 7acadc0c..7a1da54 100644
--- a/chrome/browser/resources/settings/printing_page/cups_edit_printer_dialog.html
+++ b/chrome/browser/resources/settings/printing_page/cups_edit_printer_dialog.html
@@ -31,7 +31,7 @@
               on-input="onPrinterInfoChange_"
               value="{{pendingPrinter_.printerAddress}}"
               disabled="[[!networkProtocolActive_]]"
-              maxlength=128>
+              maxlength=63>
           </cr-input>
         </div>
         <div class="settings-box two-line">