Commit f729c636 authored by Jimmy Gong's avatar Jimmy Gong Committed by Commit Bot

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/+/1620600Reviewed-by: default avatarBailey Berro <baileyberro@chromium.org>
Reviewed-by: default avatarSteven Bennetts <stevenjb@chromium.org>
Commit-Queue: jimmy gong <jimmyxgong@chromium.org>
Cr-Commit-Position: refs/heads/master@{#662899}
parent 4e7b78c9
...@@ -117,7 +117,7 @@ ...@@ -117,7 +117,7 @@
</div> </div>
<div class="settings-box two-line"> <div class="settings-box two-line">
<cr-input id="printerAddressInput" label="$i18n{printerAddress}" <cr-input id="printerAddressInput" label="$i18n{printerAddress}"
value="{{newPrinter.printerAddress}}" maxlength=128> value="{{newPrinter.printerAddress}}" maxlength=63>
</cr-input> </cr-input>
</div> </div>
<div class="settings-box two-line"> <div class="settings-box two-line">
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
on-input="onPrinterInfoChange_" on-input="onPrinterInfoChange_"
value="{{pendingPrinter_.printerAddress}}" value="{{pendingPrinter_.printerAddress}}"
disabled="[[!networkProtocolActive_]]" disabled="[[!networkProtocolActive_]]"
maxlength=128> maxlength=63>
</cr-input> </cr-input>
</div> </div>
<div class="settings-box two-line"> <div class="settings-box two-line">
......
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