Update ignoreRegex to include promo codes (#2711)

Update ignoreRegex to include promo codes
This commit is contained in:
Eamon Nerbonne 2025-09-28 15:46:52 +02:00 committed by GitHub
parent b51f318dea
commit f9147189bc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 1 deletions

View file

@ -1,6 +1,6 @@
'use strict';
const ignoreRegex = /(bank|coupon|postal|user|zip).*code|(en|de)code(d|r)*|comment|author|error/i;
const ignoreRegex = /(bank|coupon|postal|user|zip|promo).*code|(en|de)code(d|r)*|comment|author|error/i;
const ignoredTypes = [ 'email', 'password', 'username' ];
const allowedInputTypes = [ 'number', 'password', 'tel', 'text' ];

View file

@ -60,6 +60,8 @@ async function testTotpFields() {
[ '', { id: '2fa', type: 'text', maxLength: '6' }, 'Generic 2FA field', true ],
[ '', { id: '2fa', type: 'text', maxLength: '4' }, 'Ignore if field maxLength too small', false ],
[ '', { id: '2fa', type: 'text', maxLength: '12' }, 'Ignore if field maxLength too long', false ],
[ '', { id: 'promocode', type: 'text', }, 'promocode id is not acceptable', false ],
[ '', { id: 'Promotional Code', type: 'text', }, 'Promotional Code id is not acceptable', false ],
[ '', { id: 'encode', type: 'text', }, 'encode id is not acceptable', false ],
[ '', { id: 'encodedText', type: 'text', }, 'encodedText is not acceptable', false ],
[ '', { id: 'decoder', type: 'text', }, 'decoder id is not acceptable', false ],