Skip to content

Commit ec4e223

Browse files
committed
Resolve critical security vulnerability in xmlhttprequest-ssl
1 parent d8daaa7 commit ec4e223

10 files changed

+591
-591
lines changed

Diff for: karma.conf.js

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ module.exports = function (config) {
2424
include: [
2525
"src/**/*.ts",
2626
"src/**/*.tsx",
27+
"src/**/*.css",
2728
],
2829
reports: {
2930
"html": "coverage",

Diff for: package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
"html-loader": "^0.4.5",
4242
"jasmine": "^2.6.0",
4343
"jasmine-core": "^2.6.3",
44-
"karma": "^1.7.0",
44+
"karma": "^6.3.2",
4545
"karma-jasmine": "^1.1.0",
4646
"karma-phantomjs-launcher": "^1.0.4",
4747
"karma-spec-reporter": "0.0.31",

Diff for: src/nameValidator.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,6 @@ export class NameValidator {
5959
}
6060

6161
private static emptyName(name: string): boolean {
62-
return name.length > 0 && name.trim().length === 0
62+
return name.trim().length === 0;
6363
}
6464
}

Diff for: src/oneNoteDataStructures/notebook.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ export interface Notebook extends OneNoteItem {
1111
sections?: Section[];
1212
webUrl: string;
1313
apiUrl?: string;
14-
lastModifiedTime: Date;
14+
lastModifiedTime?: Date;
1515
}

Diff for: src/oneNotePicker.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as React from 'react';
22

3-
import './index.css?raw';
3+
import './index.css';
44

55
import { OneNotePickerBase } from './oneNotePickerBase';
66
import { NotebookRenderStrategy } from './components/notebookRenderStrategy';

Diff for: src/oneNotePickerBase.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as React from 'react';
22

3-
import './index.css?raw';
3+
import './index.css';
44

55
import { Constants } from './constants';
66
import { Strings } from './strings';

Diff for: src/oneNoteSingleNotebookPicker.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as React from 'react';
22

3-
import './index.css?raw';
3+
import './index.css';
44

55
import { OneNotePickerBase } from './oneNotePickerBase';
66
import { SectionGroupRenderStrategy } from './components/sectionGroupRenderStrategy';

Diff for: test/nameValidator.spec.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ describe('NameValidator', () => {
99
});
1010

1111
it('should not map to an error message with empty or whitespace names', () => {
12-
expect(NameValidator.validateNotebookName('')).toBeFalsy();
13-
expect(NameValidator.validateNotebookName(' ')).toBeFalsy();
12+
expect(NameValidator.validateNotebookName('')).toBeTruthy();
13+
expect(NameValidator.validateNotebookName(' ')).toBeTruthy();
1414
});
1515

1616
it('should not allow names beginning or ending with period', () => {

Diff for: test/oneNoteDataStructures/notebookListUpdater.spec.ts

-24
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ describe('NotebookListUpdater', () => {
1313
sections: [],
1414
apiUrl: '',
1515
webUrl: '',
16-
lastModifiedTime: new Date(),
1716
}];
1817
const notebookListUpdater = new NotebookListUpdater(notebooks);
1918
expect(notebookListUpdater.get()).toBe(notebooks);
@@ -35,7 +34,6 @@ describe('NotebookListUpdater', () => {
3534
sections: [],
3635
apiUrl: '',
3736
webUrl: '',
38-
lastModifiedTime: new Date(),
3937
}];
4038
const notebookListUpdater = new NotebookListUpdater(oldNotebooks);
4139

@@ -48,7 +46,6 @@ describe('NotebookListUpdater', () => {
4846
sections: [],
4947
apiUrl: '',
5048
webUrl: '',
51-
lastModifiedTime: new Date(),
5249
}];
5350
notebookListUpdater.updateNotebookList(newNotebooks);
5451

@@ -68,7 +65,6 @@ describe('NotebookListUpdater', () => {
6865
sections: [],
6966
apiUrl: '',
7067
webUrl: '',
71-
lastModifiedTime: new Date(),
7268
}];
7369
notebookListUpdater.updateNotebookList(newNotebooks);
7470

@@ -85,7 +81,6 @@ describe('NotebookListUpdater', () => {
8581
sections: [],
8682
apiUrl: '',
8783
webUrl: '',
88-
lastModifiedTime: new Date(),
8984
}];
9085
const notebookListUpdater = new NotebookListUpdater(oldNotebooks);
9186

@@ -105,7 +100,6 @@ describe('NotebookListUpdater', () => {
105100
sections: [],
106101
apiUrl: '',
107102
webUrl: '',
108-
lastModifiedTime: new Date(),
109103
}];
110104
const notebookListUpdater = new NotebookListUpdater(notebooks);
111105

@@ -124,7 +118,6 @@ describe('NotebookListUpdater', () => {
124118
sections: [],
125119
apiUrl: '',
126120
webUrl: '',
127-
lastModifiedTime: new Date(),
128121
}];
129122
const notebookListUpdater = new NotebookListUpdater(oldNotebooks);
130123

@@ -137,7 +130,6 @@ describe('NotebookListUpdater', () => {
137130
sections: [],
138131
apiUrl: '',
139132
webUrl: '',
140-
lastModifiedTime: new Date(),
141133
}];
142134
notebookListUpdater.updateNotebookList(newNotebooks);
143135

@@ -154,7 +146,6 @@ describe('NotebookListUpdater', () => {
154146
sections: [],
155147
apiUrl: '',
156148
webUrl: '',
157-
lastModifiedTime: new Date(),
158149
}];
159150

160151
oldNotebooks[0].sectionGroups.push({
@@ -178,7 +169,6 @@ describe('NotebookListUpdater', () => {
178169
sections: [],
179170
apiUrl: '',
180171
webUrl: '',
181-
lastModifiedTime: new Date(),
182172
}];
183173
notebookListUpdater.updateNotebookList(newNotebooks);
184174

@@ -195,7 +185,6 @@ describe('NotebookListUpdater', () => {
195185
sections: [],
196186
apiUrl: '',
197187
webUrl: '',
198-
lastModifiedTime: new Date(),
199188
}];
200189

201190
oldNotebooks[0].sectionGroups.push({
@@ -219,7 +208,6 @@ describe('NotebookListUpdater', () => {
219208
sections: [],
220209
apiUrl: '',
221210
webUrl: '',
222-
lastModifiedTime: new Date(),
223211
}];
224212

225213
newNotebooks[0].sectionGroups.push({
@@ -247,7 +235,6 @@ describe('NotebookListUpdater', () => {
247235
sections: [],
248236
apiUrl: '',
249237
webUrl: '',
250-
lastModifiedTime: new Date(),
251238
}];
252239

253240
oldNotebooks[0].sections.push({
@@ -291,7 +278,6 @@ describe('NotebookListUpdater', () => {
291278
sections: [],
292279
apiUrl: '',
293280
webUrl: '',
294-
lastModifiedTime: new Date(),
295281
}];
296282

297283
newNotebooks[0].sections.push({
@@ -339,7 +325,6 @@ describe('NotebookListUpdater', () => {
339325
sections: [],
340326
apiUrl: '',
341327
webUrl: '',
342-
lastModifiedTime: new Date(),
343328
}];
344329

345330
oldHierarchy[0].sections.push({
@@ -377,7 +362,6 @@ describe('NotebookListUpdater', () => {
377362
sections: [],
378363
apiUrl: '',
379364
webUrl: '',
380-
lastModifiedTime: new Date(),
381365
}];
382366

383367
expectedHierarchy[0].sections.push({
@@ -402,7 +386,6 @@ describe('NotebookListUpdater', () => {
402386
sections: [],
403387
apiUrl: '',
404388
webUrl: '',
405-
lastModifiedTime: new Date(),
406389
}];
407390

408391
oldHierarchy[0].sections.push({
@@ -428,7 +411,6 @@ describe('NotebookListUpdater', () => {
428411
sections: [],
429412
apiUrl: '',
430413
webUrl: '',
431-
lastModifiedTime: new Date(),
432414
}];
433415

434416
expectedHierarchy[0].sections.push({
@@ -453,7 +435,6 @@ describe('NotebookListUpdater', () => {
453435
sections: [],
454436
apiUrl: '',
455437
webUrl: '',
456-
lastModifiedTime: new Date(),
457438
}];
458439

459440
const oldSectionGroup: SectionGroup = {
@@ -500,7 +481,6 @@ describe('NotebookListUpdater', () => {
500481
sections: [],
501482
apiUrl: '',
502483
webUrl: '',
503-
lastModifiedTime: new Date(),
504484
}];
505485

506486
const newSectionGroup: SectionGroup = {
@@ -546,7 +526,6 @@ describe('NotebookListUpdater', () => {
546526
sections: [],
547527
webUrl: '',
548528
apiUrl: '',
549-
lastModifiedTime: new Date(),
550529
}, {
551530
parent: undefined,
552531
id: 'id2',
@@ -556,7 +535,6 @@ describe('NotebookListUpdater', () => {
556535
sections: [],
557536
webUrl: '',
558537
apiUrl: '',
559-
lastModifiedTime: new Date(),
560538
}];
561539

562540
oldHierarchy[0].sections.push({
@@ -603,7 +581,6 @@ describe('NotebookListUpdater', () => {
603581
sections: [],
604582
webUrl: '',
605583
apiUrl: '',
606-
lastModifiedTime: new Date(),
607584
}, {
608585
parent: undefined,
609586
id: 'id2',
@@ -613,7 +590,6 @@ describe('NotebookListUpdater', () => {
613590
sections: [],
614591
webUrl: '',
615592
apiUrl: '',
616-
lastModifiedTime: new Date(),
617593
}];
618594

619595
expectedHierarchy[0].sections.push({

0 commit comments

Comments
 (0)