Prevent CSS leaking

This commit is contained in:
varjolintu 2021-08-01 09:16:21 +03:00
parent 81c6780272
commit 6d5b929ab5
6 changed files with 11 additions and 28 deletions

View file

@ -82,11 +82,9 @@ PasswordIcon.prototype.createIcon = function(field) {
kpxcUI.setIconPosition(icon, field, this.rtl);
this.icon = icon;
const styleSheet = document.createElement('link');
styleSheet.setAttribute('rel', 'stylesheet');
styleSheet.setAttribute('href', browser.runtime.getURL('css/pwgen.css'));
const styleSheet = createStylesheet('css/pwgen.css');
const wrapper = document.createElement('div');
this.shadowRoot = wrapper.attachShadow({ mode: 'closed' });
this.shadowRoot.append(styleSheet);
this.shadowRoot.append(icon);

View file

@ -130,11 +130,9 @@ TOTPFieldIcon.prototype.createIcon = function(field, segmented = false) {
kpxcUI.setIconPosition(icon, field, this.rtl, segmented);
this.icon = icon;
const styleSheet = document.createElement('link');
styleSheet.setAttribute('rel', 'stylesheet');
styleSheet.setAttribute('href', browser.runtime.getURL('css/totp.css'));
const styleSheet = createStylesheet('css/totp.css');
const wrapper = document.createElement('div');
this.shadowRoot = wrapper.attachShadow({ mode: 'closed' });
this.shadowRoot.append(styleSheet);
this.shadowRoot.append(icon);

View file

@ -98,11 +98,9 @@ UsernameFieldIcon.prototype.createIcon = function(field) {
kpxcUI.setIconPosition(icon, field, this.rtl);
this.icon = icon;
const styleSheet = document.createElement('link');
styleSheet.setAttribute('rel', 'stylesheet');
styleSheet.setAttribute('href', browser.runtime.getURL('css/username.css'));
const styleSheet = createStylesheet('css/username.css');
const wrapper = document.createElement('div');
this.shadowRoot = wrapper.attachShadow({ mode: 'closed' });
this.shadowRoot.append(styleSheet);
this.shadowRoot.append(icon);

View file

@ -1,8 +1,8 @@
{
"manifest_version": 2,
"name": "KeePassXC-Browser",
"version": "1.7.9.1",
"version_name": "1.7.9.1",
"version": "1.7.10",
"version_name": "1.7.10",
"description": "__MSG_extensionDescription__",
"author": "KeePassXC Team",
"icons": {
@ -64,17 +64,6 @@
"content/totp-field.js",
"content/username-field.js"
],
"css": [
"css/autocomplete.css",
"css/banner.css",
"css/button.css",
"css/colors.css",
"css/define.css",
"css/notification.css",
"css/pwgen.css",
"css/totp.css",
"css/username.css"
],
"run_at": "document_idle",
"all_frames": true
}

4
package-lock.json generated
View file

@ -1,12 +1,12 @@
{
"name": "KeePassXC-Browser",
"version": "1.7.4",
"version": "1.7.10",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "KeePassXC-Browser",
"version": "1.7.4",
"version": "1.7.10",
"license": "GPL-3.0",
"dependencies": {
"file-url": "^3.0.0",

View file

@ -1,6 +1,6 @@
{
"name": "KeePassXC-Browser",
"version": "1.7.9.1",
"version": "1.7.10",
"description": "KeePassXC-Browser",
"main": "build.js",
"devDependencies": {