fix: sonar

This commit is contained in:
ShareVB 2024-09-01 20:06:08 +02:00
parent 1fb3e1f922
commit d30344beef
2 changed files with 2 additions and 2 deletions

View file

@ -61,7 +61,7 @@ describe('qr-code-decoder', () => {
authentication: 'WPA',
hidden: 'false',
name: 'ssid',
password: 'password',
password: 'password', // NOSONAR
},
});
expect(parseQRData('BEGIN:VCALENDAR\nPRODID:-//xyz Corp//NONSGML PDA Calendar Version 1.0//EN\nVERSION:2.0\nBEGIN:VEVENT\nDTSTAMP:19960704T120000Z\nUID:uid1@example.com\nORGANIZER:mailto:jsmith@example.com\nDTSTART:19960918T143000Z\nDTEND:19960920T220000Z\nSTATUS:CONFIRMED\nCATEGORIES:CONFERENCE\nSUMMARY:Networld+Interop Conference\nDESCRIPTION:Networld+Interop Conference\n and Exhibit\\nAtlanta World Congress Center\\n\n Atlanta\\, Georgia\nEND:VEVENT\nEND:VCALENDAR'))

View file

@ -70,7 +70,7 @@ export function parseQRData(qrContent: string | null) {
},
};
}
if (/\w+:\/\//.test(qrContent)) {
if (/^(?:https?|ftp):\/\//.test(qrContent)) {
return {
type: 'Url',
value: qrContent,