From 28f559d5619b2a364af077ac86ef54dd8f16ba1a Mon Sep 17 00:00:00 2001 From: nuxeo-webui-jx-bot Date: Fri, 3 May 2024 08:55:44 +0000 Subject: [PATCH 01/11] Update 3.1.8-SNAPSHOT to 3.1.9-SNAPSHOT --- .env.sample | 2 +- charts/preview/Chart.yaml | 2 +- ftest/pom.xml | 2 +- package.json | 10 +++++----- packages/nuxeo-web-ui-ftest/package.json | 2 +- plugin/a11y/pom.xml | 2 +- plugin/itests/addon/pom.xml | 2 +- plugin/itests/marketplace/pom.xml | 2 +- plugin/metrics/pom.xml | 2 +- plugin/web-ui/addon/pom.xml | 2 +- plugin/web-ui/marketplace/pom.xml | 2 +- pom.xml | 2 +- 12 files changed, 16 insertions(+), 16 deletions(-) diff --git a/.env.sample b/.env.sample index 393b0f244a..d043040328 100644 --- a/.env.sample +++ b/.env.sample @@ -1,4 +1,4 @@ -NUXEO_WEB_UI_VERSION=3.1.8-SNAPSHOT +NUXEO_WEB_UI_VERSION=3.1.9-SNAPSHOT NUXEO_VERSION=master NUXEO_PACKAGES=nuxeo-drive nuxeo-liveconnect nuxeo-template-rendering NUXEO_DEV_MODE=true diff --git a/charts/preview/Chart.yaml b/charts/preview/Chart.yaml index 2f3ced4bfe..19475d2269 100644 --- a/charts/preview/Chart.yaml +++ b/charts/preview/Chart.yaml @@ -2,4 +2,4 @@ apiVersion: v1 description: A Helm chart for Web UI preview icon: https://media.licdn.com/dms/image/C4D0BAQFPXiXFrp4LBA/company-logo_200_200/0?e=2159024400&v=beta&t=RW9EU0QUciUVuPSpLySd9FtJ2yG-O37_hAAvc32f6ro name: preview -version: 3.1.8-SNAPSHOT +version: 3.1.9-SNAPSHOT diff --git a/ftest/pom.xml b/ftest/pom.xml index b2acd0509f..bac2e61fe6 100644 --- a/ftest/pom.xml +++ b/ftest/pom.xml @@ -4,7 +4,7 @@ org.nuxeo.web.ui nuxeo-web-ui-parent - 3.1.8-SNAPSHOT + 3.1.9-SNAPSHOT ../pom.xml diff --git a/package.json b/package.json index 4c3e0c19b6..ca6d6b1ca4 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "repository": "nuxeo/nuxeo-web-ui.git", "homepage": "http://www.nuxeo.com", "name": "@nuxeo/nuxeo-web-ui", - "version": "3.1.8-SNAPSHOT", + "version": "3.1.9-SNAPSHOT", "license": "Apache-2.0", "vendor": "Nuxeo", "engines": { @@ -14,7 +14,7 @@ }, "devDependencies": { "@nuxeo/nuxeo-web-ui-ftest": "file:./packages/nuxeo-web-ui-ftest", - "@nuxeo/testing-helpers": "~3.1.8-rc", + "@nuxeo/testing-helpers": "~3.1.9-rc", "@open-wc/eslint-config": "^0.3.0", "@open-wc/karma-esm": "^2.13.21", "@open-wc/prettier-config": "^0.1.0", @@ -109,9 +109,9 @@ "@material/mwc-snackbar": "^0.26.1", "@nuxeo/chart-elements": "^4.0.0-nx.1", "@nuxeo/moment": "^2.24.0-nx.0", - "@nuxeo/nuxeo-dataviz-elements": "~3.1.8-rc", - "@nuxeo/nuxeo-elements": "~3.1.8-rc", - "@nuxeo/nuxeo-ui-elements": "~3.1.8-rc", + "@nuxeo/nuxeo-dataviz-elements": "~3.1.9-rc", + "@nuxeo/nuxeo-elements": "~3.1.9-rc", + "@nuxeo/nuxeo-ui-elements": "~3.1.9-rc", "@nuxeo/page": "^1.11.4-nx.0", "@polymer/app-layout": "^3.1.0", "@polymer/iron-a11y-announcer": "^3.2.0", diff --git a/packages/nuxeo-web-ui-ftest/package.json b/packages/nuxeo-web-ui-ftest/package.json index 36abe3350f..fcf50c05c2 100644 --- a/packages/nuxeo-web-ui-ftest/package.json +++ b/packages/nuxeo-web-ui-ftest/package.json @@ -1,6 +1,6 @@ { "name": "@nuxeo/nuxeo-web-ui-ftest", - "version": "3.1.8-SNAPSHOT", + "version": "3.1.9-SNAPSHOT", "bin": { "nuxeo-web-ui-ftest": "./bin/nuxeo-web-ui-ftest.js" }, diff --git a/plugin/a11y/pom.xml b/plugin/a11y/pom.xml index 699b9519f2..cbc37112c4 100644 --- a/plugin/a11y/pom.xml +++ b/plugin/a11y/pom.xml @@ -4,7 +4,7 @@ org.nuxeo.web.ui nuxeo-web-ui-parent - 3.1.8-SNAPSHOT + 3.1.9-SNAPSHOT ../../pom.xml diff --git a/plugin/itests/addon/pom.xml b/plugin/itests/addon/pom.xml index ce379c484f..1ea3b77225 100644 --- a/plugin/itests/addon/pom.xml +++ b/plugin/itests/addon/pom.xml @@ -4,7 +4,7 @@ org.nuxeo.web.ui nuxeo-web-ui-parent - 3.1.8-SNAPSHOT + 3.1.9-SNAPSHOT ../../../pom.xml diff --git a/plugin/itests/marketplace/pom.xml b/plugin/itests/marketplace/pom.xml index 5b2a407cbc..d7590225f2 100644 --- a/plugin/itests/marketplace/pom.xml +++ b/plugin/itests/marketplace/pom.xml @@ -3,7 +3,7 @@ org.nuxeo.web.ui nuxeo-web-ui-parent - 3.1.8-SNAPSHOT + 3.1.9-SNAPSHOT ../../../pom.xml diff --git a/plugin/metrics/pom.xml b/plugin/metrics/pom.xml index dc17734efd..c76e37e7dd 100644 --- a/plugin/metrics/pom.xml +++ b/plugin/metrics/pom.xml @@ -4,7 +4,7 @@ org.nuxeo.web.ui nuxeo-web-ui-parent - 3.1.8-SNAPSHOT + 3.1.9-SNAPSHOT ../../pom.xml diff --git a/plugin/web-ui/addon/pom.xml b/plugin/web-ui/addon/pom.xml index 084bef21a4..03a8b7e55a 100644 --- a/plugin/web-ui/addon/pom.xml +++ b/plugin/web-ui/addon/pom.xml @@ -3,7 +3,7 @@ org.nuxeo.web.ui nuxeo-web-ui-parent - 3.1.8-SNAPSHOT + 3.1.9-SNAPSHOT ../../../pom.xml diff --git a/plugin/web-ui/marketplace/pom.xml b/plugin/web-ui/marketplace/pom.xml index 77e1522d04..0b6625f921 100644 --- a/plugin/web-ui/marketplace/pom.xml +++ b/plugin/web-ui/marketplace/pom.xml @@ -3,7 +3,7 @@ org.nuxeo.web.ui nuxeo-web-ui-parent - 3.1.8-SNAPSHOT + 3.1.9-SNAPSHOT ../../../pom.xml diff --git a/pom.xml b/pom.xml index 4bc9ed1da2..f4d5d2b953 100644 --- a/pom.xml +++ b/pom.xml @@ -11,7 +11,7 @@ pom Nuxeo Web UI - Parent Nuxeo Web UI - Parent - 3.1.8-SNAPSHOT + 3.1.9-SNAPSHOT 2023.* From c642672e165fd63fc99595a2bb3a7103f03d501a Mon Sep 17 00:00:00 2001 From: rahuljain-dev Date: Tue, 30 Apr 2024 15:42:40 +0530 Subject: [PATCH 02/11] WEBUI-1501: Update our elements to show a view instead of a download --- .../nuxeo-document-grid-thumbnail.js | 19 ++++++++++++++++--- .../nuxeo-document-list-item.js | 19 ++++++++++++++++--- 2 files changed, 32 insertions(+), 6 deletions(-) diff --git a/elements/nuxeo-data-grid/nuxeo-document-grid-thumbnail.js b/elements/nuxeo-data-grid/nuxeo-document-grid-thumbnail.js index f7a55a7055..50f9e33ad0 100644 --- a/elements/nuxeo-data-grid/nuxeo-document-grid-thumbnail.js +++ b/elements/nuxeo-data-grid/nuxeo-document-grid-thumbnail.js @@ -271,13 +271,26 @@ Polymer({ observers: ['_selectedItemsChanged(selectedItems.splices)'], _thumbnail(doc) { - return doc && + if ( + doc && doc.uid && doc.contextParameters && doc.contextParameters.thumbnail && doc.contextParameters.thumbnail.url - ? doc.contextParameters.thumbnail.url - : ''; + ) { + if (!this.isFollowRedirectEnabled()) { + const splitter = doc.contextParameters.thumbnail.url.indexOf('?') > -1 ? '&' : '?'; + doc.contextParameters.thumbnail.url = `${doc.contextParameters.thumbnail.url}${splitter}clientReason=view`; + } + return doc.contextParameters.thumbnail.url; + } + return ''; + }, + + isFollowRedirectEnabled() { + const followRedirect = + Nuxeo && Nuxeo.UI && Nuxeo.UI.config && Nuxeo.UI.config.url && Nuxeo.UI.config.url.followRedirect; + return followRedirect ? String(followRedirect).toLowerCase() === 'true' : false; }, handleClick(e) { diff --git a/elements/nuxeo-data-list/nuxeo-document-list-item.js b/elements/nuxeo-data-list/nuxeo-document-list-item.js index f3c6d13e76..8e8aff3d89 100644 --- a/elements/nuxeo-data-list/nuxeo-document-list-item.js +++ b/elements/nuxeo-data-list/nuxeo-document-list-item.js @@ -256,13 +256,26 @@ Polymer({ observers: ['_selectedItemsChanged(selectedItems.splices)'], _thumbnail(doc) { - return doc && + if ( + doc && doc.uid && doc.contextParameters && doc.contextParameters.thumbnail && doc.contextParameters.thumbnail.url - ? doc.contextParameters.thumbnail.url - : ''; + ) { + if (!this.isFollowRedirectEnabled()) { + const splitter = doc.contextParameters.thumbnail.url.indexOf('?') > -1 ? '&' : '?'; + doc.contextParameters.thumbnail.url = `${doc.contextParameters.thumbnail.url}${splitter}clientReason=view`; + } + return doc.contextParameters.thumbnail.url; + } + return ''; + }, + + isFollowRedirectEnabled() { + const followRedirect = + Nuxeo && Nuxeo.UI && Nuxeo.UI.config && Nuxeo.UI.config.url && Nuxeo.UI.config.url.followRedirect; + return followRedirect ? String(followRedirect).toLowerCase() === 'true' : false; }, handleClick(e) { From 4962b5a1dedc618e6f8358dde9eff132ed583bb9 Mon Sep 17 00:00:00 2001 From: rakeshkumar1019 Date: Tue, 23 Apr 2024 06:44:51 +0530 Subject: [PATCH 03/11] ELEMENTS-1722: preview for Office files in the Attachments --- ftest/features/preview.feature | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ftest/features/preview.feature b/ftest/features/preview.feature index cffac113df..37a9970253 100644 --- a/ftest/features/preview.feature +++ b/ftest/features/preview.feature @@ -57,5 +57,5 @@ Feature: Content Preview | sample.mp4 | nuxeo-video-viewer | | sample.mp3 | audio | | sample.pdf | nuxeo-pdf-viewer | - | sample.odt | object | - | sample.txt | object | + | sample.odt | nuxeo-pdf-viewer | + | sample.txt | nuxeo-pdf-viewer | From 3e9e14e13f0d05e66940b1e78bda218fe021241e Mon Sep 17 00:00:00 2001 From: alokhyland Date: Wed, 1 May 2024 16:52:23 +0530 Subject: [PATCH 04/11] WEBUI-1507: update group test case --- packages/nuxeo-web-ui-ftest/pages/ui/group.js | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/packages/nuxeo-web-ui-ftest/pages/ui/group.js b/packages/nuxeo-web-ui-ftest/pages/ui/group.js index 1d377e73e6..d667fe8ce1 100644 --- a/packages/nuxeo-web-ui-ftest/pages/ui/group.js +++ b/packages/nuxeo-web-ui-ftest/pages/ui/group.js @@ -77,10 +77,17 @@ export default class Group extends BasePage { } async searchResult(searchTerm) { - const ele = await this.el; - await driver.pause(1000); - const results = await ele.elements('nuxeo-card[name="groups"] .table [name="id"]'); - const match = await results.find(async (e) => (await e.getText()) === searchTerm); - return match; + let matchedElements; + const match = async (e) => { + const currentText = await e.getText(); + return currentText === searchTerm; + }; + await driver.waitUntil(async () => { + matchedElements = await this.el.elements('nuxeo-card[name="groups"] .table [name="id"]'); + const results = await matchedElements.some(match); + return results; + }); + + return matchedElements.find(match); } } From 38cf58117b2cf4ae17371c8a09a0ffa9c2b0c3f6 Mon Sep 17 00:00:00 2001 From: rahuljain-dev Date: Fri, 17 May 2024 12:56:21 +0530 Subject: [PATCH 05/11] WEBUI-1510: Own Code Static Scan : Cross-Site Scripting (XSS) --- .../nuxeo-document-creation-behavior.js | 30 ++++++++++++------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/elements/nuxeo-document-creation/nuxeo-document-creation-behavior.js b/elements/nuxeo-document-creation/nuxeo-document-creation-behavior.js index c03a762215..aaa2001740 100644 --- a/elements/nuxeo-document-creation/nuxeo-document-creation-behavior.js +++ b/elements/nuxeo-document-creation/nuxeo-document-creation-behavior.js @@ -20,8 +20,6 @@ import { config } from '@nuxeo/nuxeo-elements'; import { FormatBehavior } from '@nuxeo/nuxeo-ui-elements/nuxeo-format-behavior.js'; import { RoutingBehavior } from '@nuxeo/nuxeo-ui-elements/nuxeo-routing-behavior.js'; -let schemaFetcher = null; - /** * `Nuxeo.DocumentCreationBehavior` * @@ -78,24 +76,34 @@ export const DocumentCreationBehavior = [ subtypes: { type: Array, }, + + _resource: { + type: Object, + readOnly: true, + }, + }, + + get resource() { + if (!this._resource) { + this._set_resource(document.createElement('nuxeo-resource')); + this.shadowRoot.appendChild(this._resource); + } + return this._resource; }, observers: ['_validateLocation(isValidTargetPath,suggesterChildren)', '_updateDocument(selectedDocType, parent)'], newDocument(type, properties) { - if (!schemaFetcher) { - schemaFetcher = document.createElement('nuxeo-resource'); - this.shadowRoot.appendChild(schemaFetcher); - } - schemaFetcher.path = `path/${this.targetPath}/@emptyWithDefault`; - schemaFetcher.params = { type: this.selectedDocType.type }; - schemaFetcher.headers = { + const { resource } = this; + resource.path = `path/${this.targetPath}/@emptyWithDefault`; + resource.params = { type: this.selectedDocType.type }; + resource.headers = { properties: '*', 'fetch-document': 'properties', 'translate-directoryEntry': 'label', }; - schemaFetcher.enrichers = config.get('enrichers', {}); - return schemaFetcher.get().then((doc) => { + resource.enrichers = config.get('enrichers', {}); + return resource.get().then((doc) => { if (properties) { Object.keys(properties).forEach((prop) => { doc.properties[prop] = properties[prop]; From eebbf8f50b3304be9a5c5fb6fcdabb070c96a887 Mon Sep 17 00:00:00 2001 From: alokhyland Date: Fri, 24 May 2024 14:11:31 +0530 Subject: [PATCH 06/11] WEBUI-1511: Own Code Static Scan : Open Redirect --- elements/routing.js | 25 +++++++++++++++++-- .../resources/OSGI-INF/web-ui-properties.xml | 7 ++++-- 2 files changed, 28 insertions(+), 4 deletions(-) diff --git a/elements/routing.js b/elements/routing.js index 3499e5c2eb..8fd087b3f6 100644 --- a/elements/routing.js +++ b/elements/routing.js @@ -27,6 +27,23 @@ function scrollToTop(ctx, next) { next(); } +function getTrustedDomains(path) { + const trustedDomains = Nuxeo && Nuxeo.UI && Nuxeo.UI.config && Nuxeo.UI.config.trustedDomains; + const pathUrl = new URL(path); + const { hostname } = pathUrl; + const queryParams = pathUrl.search.split('?')[1]; + const encodepath = queryParams ? `${pathUrl.origin}?${encodeURIComponent(queryParams)}` : path; + if (!trustedDomains) return { encodepath, isvalidUrl: true }; + const trustedDomainList = trustedDomains.split(','); + const isvalidUrl = trustedDomainList.some((url) => { + const isFullpath = /^http(s)?:\/\//.test(url); + const parsedURL = isFullpath ? url : `https://${url}`; + const { hostname: currentUrlhost } = new URL(parsedURL); + return currentUrlhost.toLowerCase() === hostname.toLowerCase(); + }); + return { encodepath, isvalidUrl }; +} + function _routeAdmin(selectedAdminTab, errorPath, routeData) { const hasPermission = app.currentUser.isAdministrator || app.currentUser.extendedGroups.find((grp) => grp.name === 'powerusers'); @@ -37,7 +54,6 @@ function _routeAdmin(selectedAdminTab, errorPath, routeData) { app.showError(404, '', errorPath); } } - // Routes page('*', scrollToTop, (ctx, next) => { next(); @@ -197,7 +213,12 @@ app.router = { } const isFullpath = /^http(s)?:\/\//.test(path); if (isFullpath) { - window.location = path; + const { encodepath, isvalidUrl } = getTrustedDomains(path); + if (isvalidUrl) { + const link = document.createElement('a'); + link.setAttribute('href', encodepath); + link.click(); + } } else { page(path); } diff --git a/plugin/web-ui/addon/src/main/resources/OSGI-INF/web-ui-properties.xml b/plugin/web-ui/addon/src/main/resources/OSGI-INF/web-ui-properties.xml index 6e5b7b87b5..87fc8138fc 100644 --- a/plugin/web-ui/addon/src/main/resources/OSGI-INF/web-ui-properties.xml +++ b/plugin/web-ui/addon/src/main/resources/OSGI-INF/web-ui-properties.xml @@ -36,7 +36,6 @@ ${nuxeo.s3storage.useDirectUpload:=false} - ${org.nuxeo.download.url.follow.redirect:=false} @@ -51,5 +50,9 @@ + + + ${nuxeo.trustedDomains} + - + \ No newline at end of file From f870d78fe588c2f6632429a5be3ffaaa144afd0f Mon Sep 17 00:00:00 2001 From: alokhyland Date: Wed, 29 May 2024 17:38:57 +0530 Subject: [PATCH 07/11] WEBUI-1511: Own Code Static Scan : Open Redirect --- elements/routing.js | 40 +++++++++++++------ .../resources/OSGI-INF/web-ui-properties.xml | 2 +- 2 files changed, 28 insertions(+), 14 deletions(-) diff --git a/elements/routing.js b/elements/routing.js index 8fd087b3f6..1c3037cce8 100644 --- a/elements/routing.js +++ b/elements/routing.js @@ -27,21 +27,34 @@ function scrollToTop(ctx, next) { next(); } -function getTrustedDomains(path) { +function createUrlFromString(str) { + const httpRegex = /^https?:\/\//; + const wwwRegex = /www\./; + str = httpRegex.test(str) ? str : `http://${str}`; + str = wwwRegex.test(str) ? str : str.replace(/^(https?:\/\/)?/, '$1www.'); + return str; +} + +function isTrustedDomain(path) { const trustedDomains = Nuxeo && Nuxeo.UI && Nuxeo.UI.config && Nuxeo.UI.config.trustedDomains; + if (!trustedDomains) return true; + const modifiedPathUrl = createUrlFromString(path); + const pathUrl = new URL(modifiedPathUrl); + const { hostname: userHostName } = pathUrl; + const trustedDomainList = trustedDomains.split(','); + const isValidUrl = trustedDomainList.some((url) => { + const updatedUrl = createUrlFromString(url); + const { hostname: currentUrlHostName } = new URL(updatedUrl); + return currentUrlHostName?.toLowerCase() === userHostName?.toLowerCase(); + }); + return isValidUrl; +} + +function encodeQueryParams(path) { const pathUrl = new URL(path); - const { hostname } = pathUrl; const queryParams = pathUrl.search.split('?')[1]; const encodepath = queryParams ? `${pathUrl.origin}?${encodeURIComponent(queryParams)}` : path; - if (!trustedDomains) return { encodepath, isvalidUrl: true }; - const trustedDomainList = trustedDomains.split(','); - const isvalidUrl = trustedDomainList.some((url) => { - const isFullpath = /^http(s)?:\/\//.test(url); - const parsedURL = isFullpath ? url : `https://${url}`; - const { hostname: currentUrlhost } = new URL(parsedURL); - return currentUrlhost.toLowerCase() === hostname.toLowerCase(); - }); - return { encodepath, isvalidUrl }; + return encodepath; } function _routeAdmin(selectedAdminTab, errorPath, routeData) { @@ -213,8 +226,9 @@ app.router = { } const isFullpath = /^http(s)?:\/\//.test(path); if (isFullpath) { - const { encodepath, isvalidUrl } = getTrustedDomains(path); - if (isvalidUrl) { + const isValidUrl = isTrustedDomain(path); + if (isValidUrl) { + const encodepath = encodeQueryParams(path); const link = document.createElement('a'); link.setAttribute('href', encodepath); link.click(); diff --git a/plugin/web-ui/addon/src/main/resources/OSGI-INF/web-ui-properties.xml b/plugin/web-ui/addon/src/main/resources/OSGI-INF/web-ui-properties.xml index 87fc8138fc..8c14b3ed55 100644 --- a/plugin/web-ui/addon/src/main/resources/OSGI-INF/web-ui-properties.xml +++ b/plugin/web-ui/addon/src/main/resources/OSGI-INF/web-ui-properties.xml @@ -52,7 +52,7 @@ - ${nuxeo.trustedDomains} + ${org.nuxeo.web.ui.trustedDomains:=''} \ No newline at end of file From b43d114c8d93bf69ee2692a2840bfd91e7d1c167 Mon Sep 17 00:00:00 2001 From: alokhyland Date: Tue, 4 Jun 2024 17:33:38 +0530 Subject: [PATCH 08/11] WEBUI-1511:revert code --- elements/routing.js | 38 +------------------ .../resources/OSGI-INF/web-ui-properties.xml | 3 -- 2 files changed, 1 insertion(+), 40 deletions(-) diff --git a/elements/routing.js b/elements/routing.js index 1c3037cce8..6585010dea 100644 --- a/elements/routing.js +++ b/elements/routing.js @@ -27,36 +27,6 @@ function scrollToTop(ctx, next) { next(); } -function createUrlFromString(str) { - const httpRegex = /^https?:\/\//; - const wwwRegex = /www\./; - str = httpRegex.test(str) ? str : `http://${str}`; - str = wwwRegex.test(str) ? str : str.replace(/^(https?:\/\/)?/, '$1www.'); - return str; -} - -function isTrustedDomain(path) { - const trustedDomains = Nuxeo && Nuxeo.UI && Nuxeo.UI.config && Nuxeo.UI.config.trustedDomains; - if (!trustedDomains) return true; - const modifiedPathUrl = createUrlFromString(path); - const pathUrl = new URL(modifiedPathUrl); - const { hostname: userHostName } = pathUrl; - const trustedDomainList = trustedDomains.split(','); - const isValidUrl = trustedDomainList.some((url) => { - const updatedUrl = createUrlFromString(url); - const { hostname: currentUrlHostName } = new URL(updatedUrl); - return currentUrlHostName?.toLowerCase() === userHostName?.toLowerCase(); - }); - return isValidUrl; -} - -function encodeQueryParams(path) { - const pathUrl = new URL(path); - const queryParams = pathUrl.search.split('?')[1]; - const encodepath = queryParams ? `${pathUrl.origin}?${encodeURIComponent(queryParams)}` : path; - return encodepath; -} - function _routeAdmin(selectedAdminTab, errorPath, routeData) { const hasPermission = app.currentUser.isAdministrator || app.currentUser.extendedGroups.find((grp) => grp.name === 'powerusers'); @@ -226,13 +196,7 @@ app.router = { } const isFullpath = /^http(s)?:\/\//.test(path); if (isFullpath) { - const isValidUrl = isTrustedDomain(path); - if (isValidUrl) { - const encodepath = encodeQueryParams(path); - const link = document.createElement('a'); - link.setAttribute('href', encodepath); - link.click(); - } + window.location = path; } else { page(path); } diff --git a/plugin/web-ui/addon/src/main/resources/OSGI-INF/web-ui-properties.xml b/plugin/web-ui/addon/src/main/resources/OSGI-INF/web-ui-properties.xml index 8c14b3ed55..cf0b597912 100644 --- a/plugin/web-ui/addon/src/main/resources/OSGI-INF/web-ui-properties.xml +++ b/plugin/web-ui/addon/src/main/resources/OSGI-INF/web-ui-properties.xml @@ -51,8 +51,5 @@ - - ${org.nuxeo.web.ui.trustedDomains:=''} - \ No newline at end of file From b0fe4f6e06c039ca4518319057ae93906ec4b6ed Mon Sep 17 00:00:00 2001 From: rahuljain-dev Date: Wed, 5 Jun 2024 13:25:15 +0530 Subject: [PATCH 09/11] WEBUI-1494: Add fallback to two-letter locale for Swedish --- .../addon/src/main/resources/OSGI-INF/deployment-fragment.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugin/web-ui/addon/src/main/resources/OSGI-INF/deployment-fragment.xml b/plugin/web-ui/addon/src/main/resources/OSGI-INF/deployment-fragment.xml index 7ce9c713ee..c9a85323a4 100644 --- a/plugin/web-ui/addon/src/main/resources/OSGI-INF/deployment-fragment.xml +++ b/plugin/web-ui/addon/src/main/resources/OSGI-INF/deployment-fragment.xml @@ -12,6 +12,8 @@ to="nuxeo.war/ui/i18n/messages-es.json" /> + From 3ccfaf2cbb28d932f8035cc92d1f6618480e083f Mon Sep 17 00:00:00 2001 From: rahuljain-dev Date: Wed, 5 Jun 2024 13:15:48 +0530 Subject: [PATCH 10/11] WEBUI-697: Add fallback to French (fr) from fr-CA locale --- .../addon/src/main/resources/OSGI-INF/deployment-fragment.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugin/web-ui/addon/src/main/resources/OSGI-INF/deployment-fragment.xml b/plugin/web-ui/addon/src/main/resources/OSGI-INF/deployment-fragment.xml index c9a85323a4..ef82d8783e 100644 --- a/plugin/web-ui/addon/src/main/resources/OSGI-INF/deployment-fragment.xml +++ b/plugin/web-ui/addon/src/main/resources/OSGI-INF/deployment-fragment.xml @@ -17,6 +17,8 @@ + From 0f5c4387d565d78cab6ca4fa0386cd790e6eb878 Mon Sep 17 00:00:00 2001 From: nuxeo-webui-jx-bot Date: Mon, 10 Jun 2024 07:39:42 +0000 Subject: [PATCH 11/11] Update 3.1.9-SNAPSHOT to 3.1.10-SNAPSHOT --- .env.sample | 2 +- charts/preview/Chart.yaml | 2 +- ftest/pom.xml | 2 +- package.json | 10 +++++----- packages/nuxeo-web-ui-ftest/package.json | 2 +- plugin/a11y/pom.xml | 2 +- plugin/itests/addon/pom.xml | 2 +- plugin/itests/marketplace/pom.xml | 2 +- plugin/metrics/pom.xml | 2 +- plugin/web-ui/addon/pom.xml | 2 +- plugin/web-ui/marketplace/pom.xml | 2 +- pom.xml | 2 +- 12 files changed, 16 insertions(+), 16 deletions(-) diff --git a/.env.sample b/.env.sample index d043040328..56b685211f 100644 --- a/.env.sample +++ b/.env.sample @@ -1,4 +1,4 @@ -NUXEO_WEB_UI_VERSION=3.1.9-SNAPSHOT +NUXEO_WEB_UI_VERSION=3.1.10-SNAPSHOT NUXEO_VERSION=master NUXEO_PACKAGES=nuxeo-drive nuxeo-liveconnect nuxeo-template-rendering NUXEO_DEV_MODE=true diff --git a/charts/preview/Chart.yaml b/charts/preview/Chart.yaml index 19475d2269..dda35ad3a7 100644 --- a/charts/preview/Chart.yaml +++ b/charts/preview/Chart.yaml @@ -2,4 +2,4 @@ apiVersion: v1 description: A Helm chart for Web UI preview icon: https://media.licdn.com/dms/image/C4D0BAQFPXiXFrp4LBA/company-logo_200_200/0?e=2159024400&v=beta&t=RW9EU0QUciUVuPSpLySd9FtJ2yG-O37_hAAvc32f6ro name: preview -version: 3.1.9-SNAPSHOT +version: 3.1.10-SNAPSHOT diff --git a/ftest/pom.xml b/ftest/pom.xml index bac2e61fe6..c281056684 100644 --- a/ftest/pom.xml +++ b/ftest/pom.xml @@ -4,7 +4,7 @@ org.nuxeo.web.ui nuxeo-web-ui-parent - 3.1.9-SNAPSHOT + 3.1.10-SNAPSHOT ../pom.xml diff --git a/package.json b/package.json index ca6d6b1ca4..9494e04180 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "repository": "nuxeo/nuxeo-web-ui.git", "homepage": "http://www.nuxeo.com", "name": "@nuxeo/nuxeo-web-ui", - "version": "3.1.9-SNAPSHOT", + "version": "3.1.10-SNAPSHOT", "license": "Apache-2.0", "vendor": "Nuxeo", "engines": { @@ -14,7 +14,7 @@ }, "devDependencies": { "@nuxeo/nuxeo-web-ui-ftest": "file:./packages/nuxeo-web-ui-ftest", - "@nuxeo/testing-helpers": "~3.1.9-rc", + "@nuxeo/testing-helpers": "~3.1.10-rc", "@open-wc/eslint-config": "^0.3.0", "@open-wc/karma-esm": "^2.13.21", "@open-wc/prettier-config": "^0.1.0", @@ -109,9 +109,9 @@ "@material/mwc-snackbar": "^0.26.1", "@nuxeo/chart-elements": "^4.0.0-nx.1", "@nuxeo/moment": "^2.24.0-nx.0", - "@nuxeo/nuxeo-dataviz-elements": "~3.1.9-rc", - "@nuxeo/nuxeo-elements": "~3.1.9-rc", - "@nuxeo/nuxeo-ui-elements": "~3.1.9-rc", + "@nuxeo/nuxeo-dataviz-elements": "~3.1.10-rc", + "@nuxeo/nuxeo-elements": "~3.1.10-rc", + "@nuxeo/nuxeo-ui-elements": "~3.1.10-rc", "@nuxeo/page": "^1.11.4-nx.0", "@polymer/app-layout": "^3.1.0", "@polymer/iron-a11y-announcer": "^3.2.0", diff --git a/packages/nuxeo-web-ui-ftest/package.json b/packages/nuxeo-web-ui-ftest/package.json index fcf50c05c2..5976d575e0 100644 --- a/packages/nuxeo-web-ui-ftest/package.json +++ b/packages/nuxeo-web-ui-ftest/package.json @@ -1,6 +1,6 @@ { "name": "@nuxeo/nuxeo-web-ui-ftest", - "version": "3.1.9-SNAPSHOT", + "version": "3.1.10-SNAPSHOT", "bin": { "nuxeo-web-ui-ftest": "./bin/nuxeo-web-ui-ftest.js" }, diff --git a/plugin/a11y/pom.xml b/plugin/a11y/pom.xml index cbc37112c4..b8cdd510df 100644 --- a/plugin/a11y/pom.xml +++ b/plugin/a11y/pom.xml @@ -4,7 +4,7 @@ org.nuxeo.web.ui nuxeo-web-ui-parent - 3.1.9-SNAPSHOT + 3.1.10-SNAPSHOT ../../pom.xml diff --git a/plugin/itests/addon/pom.xml b/plugin/itests/addon/pom.xml index 1ea3b77225..523daeebb3 100644 --- a/plugin/itests/addon/pom.xml +++ b/plugin/itests/addon/pom.xml @@ -4,7 +4,7 @@ org.nuxeo.web.ui nuxeo-web-ui-parent - 3.1.9-SNAPSHOT + 3.1.10-SNAPSHOT ../../../pom.xml diff --git a/plugin/itests/marketplace/pom.xml b/plugin/itests/marketplace/pom.xml index d7590225f2..3f9d6fb330 100644 --- a/plugin/itests/marketplace/pom.xml +++ b/plugin/itests/marketplace/pom.xml @@ -3,7 +3,7 @@ org.nuxeo.web.ui nuxeo-web-ui-parent - 3.1.9-SNAPSHOT + 3.1.10-SNAPSHOT ../../../pom.xml diff --git a/plugin/metrics/pom.xml b/plugin/metrics/pom.xml index c76e37e7dd..b08673916b 100644 --- a/plugin/metrics/pom.xml +++ b/plugin/metrics/pom.xml @@ -4,7 +4,7 @@ org.nuxeo.web.ui nuxeo-web-ui-parent - 3.1.9-SNAPSHOT + 3.1.10-SNAPSHOT ../../pom.xml diff --git a/plugin/web-ui/addon/pom.xml b/plugin/web-ui/addon/pom.xml index 03a8b7e55a..dd39d1bbdf 100644 --- a/plugin/web-ui/addon/pom.xml +++ b/plugin/web-ui/addon/pom.xml @@ -3,7 +3,7 @@ org.nuxeo.web.ui nuxeo-web-ui-parent - 3.1.9-SNAPSHOT + 3.1.10-SNAPSHOT ../../../pom.xml diff --git a/plugin/web-ui/marketplace/pom.xml b/plugin/web-ui/marketplace/pom.xml index 0b6625f921..96e57a42c8 100644 --- a/plugin/web-ui/marketplace/pom.xml +++ b/plugin/web-ui/marketplace/pom.xml @@ -3,7 +3,7 @@ org.nuxeo.web.ui nuxeo-web-ui-parent - 3.1.9-SNAPSHOT + 3.1.10-SNAPSHOT ../../../pom.xml diff --git a/pom.xml b/pom.xml index f4d5d2b953..ef40ec9dd4 100644 --- a/pom.xml +++ b/pom.xml @@ -11,7 +11,7 @@ pom Nuxeo Web UI - Parent Nuxeo Web UI - Parent - 3.1.9-SNAPSHOT + 3.1.10-SNAPSHOT 2023.*