Skip to content

Commit 1db7489

Browse files
committed
chore(manifest): remove unused Google Drive and OneDrive host permissions
Google Drive backup was removed (05053e8) and OneDrive is disabled, so their host permissions and CSP connect-src entries were unused. Keep www.google.com (clock sync) and Dropbox.
1 parent b1434ff commit 1db7489

2 files changed

Lines changed: 2 additions & 86 deletions

File tree

manifests/manifest-chrome.json

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,10 @@
5656
],
5757
"optional_host_permissions": [
5858
"https://www.google.com/",
59-
"https://*.dropboxapi.com/*",
60-
"https://www.googleapis.com/*",
61-
"https://accounts.google.com/o/oauth2/revoke",
62-
"https://graph.microsoft.com/me/*",
63-
"https://login.microsoftonline.com/common/oauth2/v2.0/token"
59+
"https://*.dropboxapi.com/*"
6460
],
6561
"content_security_policy": {
66-
"extension_pages": "script-src 'self'; font-src 'self'; img-src 'self' data:; style-src 'self' 'unsafe-inline'; connect-src https://www.google.com/ https://*.dropboxapi.com https://www.googleapis.com/ https://accounts.google.com/o/oauth2/revoke https://login.microsoftonline.com/common/oauth2/v2.0/token https://graph.microsoft.com/; default-src 'none'",
62+
"extension_pages": "script-src 'self'; font-src 'self'; img-src 'self' data:; style-src 'self' 'unsafe-inline'; connect-src https://www.google.com/ https://*.dropboxapi.com; default-src 'none'",
6763
"sandbox": "sandbox allow-scripts; script-src 'self' 'unsafe-eval';"
6864
}
6965
}

src/store/Permissions.ts

Lines changed: 0 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -62,86 +62,6 @@ const permissions: Permission[] = [
6262
},
6363
],
6464
},
65-
{
66-
id: "https://www.googleapis.com/*",
67-
description: chrome.i18n.getMessage("permission_drive"),
68-
revocable: true,
69-
validation: [
70-
async () => {
71-
await UserSettings.updateItems();
72-
if (UserSettings.items.driveToken !== undefined) {
73-
return {
74-
valid: false,
75-
message: chrome.i18n.getMessage("permission_drive_cannot_revoke"),
76-
};
77-
}
78-
return {
79-
valid: true,
80-
};
81-
},
82-
],
83-
},
84-
{
85-
id: "https://accounts.google.com/*",
86-
description: chrome.i18n.getMessage("permission_drive"),
87-
revocable: true,
88-
validation: [
89-
async () => {
90-
await UserSettings.updateItems();
91-
if (UserSettings.items.driveToken !== undefined) {
92-
return {
93-
valid: false,
94-
message: chrome.i18n.getMessage("permission_drive_cannot_revoke"),
95-
};
96-
}
97-
return {
98-
valid: true,
99-
};
100-
},
101-
],
102-
},
103-
{
104-
id: "https://graph.microsoft.com/*",
105-
description: chrome.i18n.getMessage("permission_onedrive"),
106-
revocable: true,
107-
validation: [
108-
async () => {
109-
await UserSettings.updateItems();
110-
if (UserSettings.items.oneDriveToken !== undefined) {
111-
return {
112-
valid: false,
113-
message: chrome.i18n.getMessage(
114-
"permission_onedrive_cannot_revoke"
115-
),
116-
};
117-
}
118-
return {
119-
valid: true,
120-
};
121-
},
122-
],
123-
},
124-
{
125-
id: "https://login.microsoftonline.com/*",
126-
description: chrome.i18n.getMessage("permission_onedrive"),
127-
revocable: true,
128-
validation: [
129-
async () => {
130-
await UserSettings.updateItems();
131-
if (UserSettings.items.oneDriveToken !== undefined) {
132-
return {
133-
valid: false,
134-
message: chrome.i18n.getMessage(
135-
"permission_onedrive_cannot_revoke"
136-
),
137-
};
138-
}
139-
return {
140-
valid: true,
141-
};
142-
},
143-
],
144-
},
14565
];
14666

14767
export class Permissions implements Module {

0 commit comments

Comments
 (0)