Commit ae4f833d authored by Dominic Battre's avatar Dominic Battre Committed by Commit Bot

Limit size of inputs on chrome://settings/addresses

This CL just prevents the user from foot gunning themselves by pasting 10 MB of
text into chrome://settings/addresses.

Bug: 1007442
Change-Id: I9ab3aa526b5ca20fcfc207c3248e9c5df5045ec2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1855961
Auto-Submit: Dominic Battré <battre@chromium.org>
Commit-Queue: Michael Giuffrida <michaelpg@chromium.org>
Reviewed-by: default avatarMichael Giuffrida <michaelpg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#707050}
parent 7683e21c
...@@ -72,13 +72,13 @@ ...@@ -72,13 +72,13 @@
<settings-textarea label="[[item.component.fieldName]]" <settings-textarea label="[[item.component.fieldName]]"
value="{{item.value}}" on-value-changed="updateCanSave_" value="{{item.value}}" on-value-changed="updateCanSave_"
class$="address-column [[long_(item)]]" autofocus class$="address-column [[long_(item)]]" autofocus
spellcheck="false"> spellcheck="false" maxlength="1000">
</settings-textarea> </settings-textarea>
</template> </template>
<template is="dom-if" if="[[!item.isTextArea]]"> <template is="dom-if" if="[[!item.isTextArea]]">
<cr-input type="text" label="[[item.component.fieldName]]" <cr-input type="text" label="[[item.component.fieldName]]"
autofocus value="{{item.value}}" spellcheck="false" autofocus value="{{item.value}}" spellcheck="false"
on-value-changed="updateCanSave_" on-value-changed="updateCanSave_" maxlength="1000"
class$="address-column [[long_(item)]]"> class$="address-column [[long_(item)]]">
</cr-input> </cr-input>
</template> </template>
...@@ -103,11 +103,12 @@ ...@@ -103,11 +103,12 @@
<div class="address-row"> <div class="address-row">
<cr-input id="phoneInput" type="text" label="$i18n{addressPhone}" <cr-input id="phoneInput" type="text" label="$i18n{addressPhone}"
class="address-column last-row" on-value-changed="updateCanSave_" class="address-column last-row" on-value-changed="updateCanSave_"
value="{{phoneNumber_}}" spellcheck="false"> value="{{phoneNumber_}}" spellcheck="false" maxlength="1000">
</cr-input> </cr-input>
<cr-input id="emailInput" type="text" label="$i18n{addressEmail}" <cr-input id="emailInput" type="text" label="$i18n{addressEmail}"
on-value-changed="updateCanSave_" value="{{email_}}" on-value-changed="updateCanSave_" value="{{email_}}"
class="address-column long last-row" spellcheck="false"> class="address-column long last-row" spellcheck="false"
maxlength="1000">
</cr-input> </cr-input>
</div> </div>
</div> </div>
......
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