1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-06-20 09:35:22 +02:00

[SM-240] Add max length limit on SM strings (#5823)

* Add max length limit on SM strings

* remove HTML attributes

* remove from project
This commit is contained in:
Thomas Avery 2023-08-08 12:08:39 -05:00 committed by GitHub
parent f43272f243
commit eca060d7e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 9 additions and 9 deletions

View File

@ -7,7 +7,7 @@
</div>
<bit-form-field *ngIf="!loading">
<bit-label>{{ "projectName" | i18n }}</bit-label>
<input appAutofocus formControlName="name" maxlength="1000" bitInput />
<input appAutofocus formControlName="name" bitInput />
</bit-form-field>
</span>
<ng-container bitDialogFooter>

View File

@ -27,7 +27,7 @@ export interface ProjectOperation {
export class ProjectDialogComponent implements OnInit {
protected formGroup = new FormGroup({
name: new FormControl("", {
validators: [Validators.required, BitValidators.trimValidator],
validators: [Validators.required, Validators.maxLength(500), BitValidators.trimValidator],
updateOn: "submit",
}),
});

View File

@ -41,7 +41,7 @@
<bit-form-field *ngIf="addNewProject == true">
<bit-label>{{ "projectName" | i18n }}</bit-label>
<input formControlName="newProjectName" maxlength="1000" bitInput />
<input formControlName="newProjectName" bitInput />
</bit-form-field>
</div>
<ng-container bitDialogFooter>

View File

@ -38,17 +38,17 @@ export interface SecretOperation {
export class SecretDialogComponent implements OnInit {
protected formGroup = new FormGroup({
name: new FormControl("", {
validators: [Validators.required, BitValidators.trimValidator],
validators: [Validators.required, Validators.maxLength(500), BitValidators.trimValidator],
updateOn: "submit",
}),
value: new FormControl("", [Validators.required]),
value: new FormControl("", [Validators.required, Validators.maxLength(3500)]),
notes: new FormControl("", {
validators: [BitValidators.trimValidator],
validators: [Validators.maxLength(7000), BitValidators.trimValidator],
updateOn: "submit",
}),
project: new FormControl("", [Validators.required]),
newProjectName: new FormControl("", {
validators: [BitValidators.trimValidator],
validators: [Validators.maxLength(500), BitValidators.trimValidator],
updateOn: "submit",
}),
});

View File

@ -8,7 +8,7 @@
<div *ngIf="!loading">
<bit-form-field>
<bit-label>{{ "serviceAccountName" | i18n }}</bit-label>
<input appAutofocus formControlName="name" maxlength="1000" bitInput />
<input appAutofocus formControlName="name" bitInput />
</bit-form-field>
</div>
</div>

View File

@ -27,7 +27,7 @@ export class ServiceAccountDialogComponent {
protected formGroup = new FormGroup(
{
name: new FormControl("", {
validators: [Validators.required, BitValidators.trimValidator],
validators: [Validators.required, Validators.maxLength(500), BitValidators.trimValidator],
updateOn: "submit",
}),
},