Skip to content

Commit d30344b

Browse files
committed
fix: sonar
1 parent 1fb3e1f commit d30344b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/tools/qr-code-decoder/qr-code-decoder.service.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ describe('qr-code-decoder', () => {
6161
authentication: 'WPA',
6262
hidden: 'false',
6363
name: 'ssid',
64-
password: 'password',
64+
password: 'password', // NOSONAR
6565
},
6666
});
6767
expect(parseQRData('BEGIN:VCALENDAR\nPRODID:-//xyz Corp//NONSGML PDA Calendar Version 1.0//EN\nVERSION:2.0\nBEGIN:VEVENT\nDTSTAMP:19960704T120000Z\nUID:[email protected]\nORGANIZER:mailto:[email protected]\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'))

src/tools/qr-code-decoder/qr-code-decoder.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ export function parseQRData(qrContent: string | null) {
7070
},
7171
};
7272
}
73-
if (/\w+:\/\//.test(qrContent)) {
73+
if (/^(?:https?|ftp):\/\//.test(qrContent)) {
7474
return {
7575
type: 'Url',
7676
value: qrContent,

0 commit comments

Comments
 (0)