mirror of
				https://github.com/Alfresco/alfresco-community-repo.git
				synced 2025-10-29 15:21:53 +00:00 
			
		
		
		
	Compare commits
	
		
			1 Commits
		
	
	
		
			feature/AC
			...
			dependabot
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|  | dc8bfdc63d | 
							
								
								
									
										41
									
								
								.github/workflows/ci.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										41
									
								
								.github/workflows/ci.yml
									
									
									
									
										vendored
									
									
								
							| @@ -15,7 +15,6 @@ on: | ||||
|   workflow_dispatch: | ||||
|  | ||||
| env: | ||||
|   JAVA_VERSION: '21' | ||||
|   DOCKERHUB_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | ||||
|   DOCKERHUB_USERNAME: ${{ secrets.DOCKER_USERNAME }} | ||||
|   GITHUB_ACTIONS_DEPLOY_TIMEOUT: 60 | ||||
| @@ -45,8 +44,6 @@ jobs: | ||||
|       - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.24.1 | ||||
|       - uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.24.1 | ||||
|       - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.24.1 | ||||
|         with: | ||||
|           java-version: ${{ env.JAVA_VERSION }} | ||||
|       - uses: Alfresco/alfresco-build-tools/.github/actions/pre-commit@v8.24.1 | ||||
|       - name: "Init" | ||||
|         run: bash ./scripts/ci/init.sh | ||||
| @@ -68,8 +65,6 @@ jobs: | ||||
|       - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.24.1 | ||||
|       - uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.24.1 | ||||
|       - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.24.1 | ||||
|         with: | ||||
|           java-version: ${{ env.JAVA_VERSION }} | ||||
|       - name: "Init" | ||||
|         run: bash ./scripts/ci/init.sh | ||||
|       - uses: Alfresco/alfresco-build-tools/.github/actions/veracode@v8.24.1 | ||||
| @@ -93,8 +88,6 @@ jobs: | ||||
|       - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.24.1 | ||||
|       - uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.24.1 | ||||
|       - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.24.1 | ||||
|         with: | ||||
|           java-version: ${{ env.JAVA_VERSION }} | ||||
|       - uses: Alfresco/alfresco-build-tools/.github/actions/github-download-file@v8.24.1 | ||||
|         with: | ||||
|           token: ${{ secrets.BOT_GITHUB_TOKEN }} | ||||
| @@ -151,8 +144,6 @@ jobs: | ||||
|       - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.24.1 | ||||
|       - uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.24.1 | ||||
|       - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.24.1 | ||||
|         with: | ||||
|           java-version: ${{ env.JAVA_VERSION }} | ||||
|       - uses: Alfresco/ya-pmd-scan@v4.3.0 | ||||
|         with: | ||||
|           classpath-build-command: "mvn test-compile -ntp -Pags -pl \"-:alfresco-community-repo-docker\"" | ||||
| @@ -186,8 +177,6 @@ jobs: | ||||
|       - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.24.1 | ||||
|       - uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.24.1 | ||||
|       - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.24.1 | ||||
|         with: | ||||
|           java-version: ${{ env.JAVA_VERSION }} | ||||
|       - name: "Init" | ||||
|         run: bash ./scripts/ci/init.sh | ||||
|       - name: "Run tests" | ||||
| @@ -225,8 +214,6 @@ jobs: | ||||
|       - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.24.1 | ||||
|       - uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.24.1 | ||||
|       - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.24.1 | ||||
|         with: | ||||
|           java-version: ${{ env.JAVA_VERSION }} | ||||
|       - name: "Build" | ||||
|         timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }} | ||||
|         run: | | ||||
| @@ -262,8 +249,6 @@ jobs: | ||||
|       - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.24.1 | ||||
|       - uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.24.1 | ||||
|       - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.24.1 | ||||
|         with: | ||||
|           java-version: ${{ env.JAVA_VERSION }} | ||||
|       - name: "Init" | ||||
|         run: bash ./scripts/ci/init.sh | ||||
|       - name: Run MariaDB ${{ matrix.version }} database | ||||
| @@ -291,8 +276,6 @@ jobs: | ||||
|       - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.24.1 | ||||
|       - uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.24.1 | ||||
|       - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.24.1 | ||||
|         with: | ||||
|           java-version: ${{ env.JAVA_VERSION }} | ||||
|       - name: "Init" | ||||
|         run: bash ./scripts/ci/init.sh | ||||
|       - name: "Run MariaDB 10.11 database" | ||||
| @@ -320,8 +303,6 @@ jobs: | ||||
|       - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.24.1 | ||||
|       - uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.24.1 | ||||
|       - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.24.1 | ||||
|         with: | ||||
|           java-version: ${{ env.JAVA_VERSION }} | ||||
|       - name: "Init" | ||||
|         run: bash ./scripts/ci/init.sh | ||||
|       - name: "Run MySQL 8 database" | ||||
| @@ -348,8 +329,6 @@ jobs: | ||||
|       - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.24.1 | ||||
|       - uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.24.1 | ||||
|       - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.24.1 | ||||
|         with: | ||||
|           java-version: ${{ env.JAVA_VERSION }} | ||||
|       - name: "Init" | ||||
|         run: bash ./scripts/ci/init.sh | ||||
|       - name: "Run PostgreSQL 14.15 database" | ||||
| @@ -376,8 +355,6 @@ jobs: | ||||
|       - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.24.1 | ||||
|       - uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.24.1 | ||||
|       - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.24.1 | ||||
|         with: | ||||
|           java-version: ${{ env.JAVA_VERSION }} | ||||
|       - name: "Init" | ||||
|         run: bash ./scripts/ci/init.sh | ||||
|       - name: "Run PostgreSQL 15.10 database" | ||||
| @@ -404,8 +381,6 @@ jobs: | ||||
|       - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.24.1 | ||||
|       - uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.24.1 | ||||
|       - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.24.1 | ||||
|         with: | ||||
|           java-version: ${{ env.JAVA_VERSION }} | ||||
|       - name: "Init" | ||||
|         run: bash ./scripts/ci/init.sh | ||||
|       - name: "Run PostgreSQL 16.6 database" | ||||
| @@ -430,8 +405,6 @@ jobs: | ||||
|       - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.24.1 | ||||
|       - uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.24.1 | ||||
|       - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.24.1 | ||||
|         with: | ||||
|           java-version: ${{ env.JAVA_VERSION }} | ||||
|       - name: "Init" | ||||
|         run: bash ./scripts/ci/init.sh | ||||
|       - name: "Run ActiveMQ" | ||||
| @@ -488,8 +461,6 @@ jobs: | ||||
|       - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.24.1 | ||||
|       - uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.24.1 | ||||
|       - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.24.1 | ||||
|         with: | ||||
|           java-version: ${{ env.JAVA_VERSION }} | ||||
|       - name: "Init" | ||||
|         run: bash ./scripts/ci/init.sh | ||||
|       - name: "Set transformers tag" | ||||
| @@ -560,8 +531,6 @@ jobs: | ||||
|       - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.24.1 | ||||
|       - uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.24.1 | ||||
|       - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.24.1 | ||||
|         with: | ||||
|           java-version: ${{ env.JAVA_VERSION }} | ||||
|       - name: "Build" | ||||
|         timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }} | ||||
|         run: | | ||||
| @@ -601,8 +570,6 @@ jobs: | ||||
|       - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.24.1 | ||||
|       - uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.24.1 | ||||
|       - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.24.1 | ||||
|         with: | ||||
|           java-version: ${{ env.JAVA_VERSION }} | ||||
|       - name: "Init" | ||||
|         run: bash ./scripts/ci/init.sh | ||||
|       - name: "Run Postgres 16.6 database" | ||||
| @@ -633,8 +600,6 @@ jobs: | ||||
|       - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.24.1 | ||||
|       - uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.24.1 | ||||
|       - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.24.1 | ||||
|         with: | ||||
|           java-version: ${{ env.JAVA_VERSION }} | ||||
|       - name: "Build" | ||||
|         timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }} | ||||
|         run: | | ||||
| @@ -667,8 +632,6 @@ jobs: | ||||
|       - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.24.1 | ||||
|       - uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.24.1 | ||||
|       - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.24.1 | ||||
|         with: | ||||
|           java-version: ${{ env.JAVA_VERSION }} | ||||
|       - name: "Build" | ||||
|         timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }} | ||||
|         run: | | ||||
| @@ -697,8 +660,6 @@ jobs: | ||||
|       - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.24.1 | ||||
|       - uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.24.1 | ||||
|       - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.24.1 | ||||
|         with: | ||||
|           java-version: ${{ env.JAVA_VERSION }} | ||||
|       - name: "Build" | ||||
|         timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }} | ||||
|         run: | | ||||
| @@ -745,8 +706,6 @@ jobs: | ||||
|       - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.24.1 | ||||
|       - uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.24.1 | ||||
|       - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.24.1 | ||||
|         with: | ||||
|           java-version: ${{ env.JAVA_VERSION }} | ||||
|       - name: "Build" | ||||
|         timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }} | ||||
|         run: | | ||||
|   | ||||
							
								
								
									
										5
									
								
								.github/workflows/master_release.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										5
									
								
								.github/workflows/master_release.yml
									
									
									
									
										vendored
									
									
								
							| @@ -7,7 +7,6 @@ on: | ||||
|       - release/** | ||||
|  | ||||
| env: | ||||
|   JAVA_VERSION: '21' | ||||
|   GIT_USERNAME: ${{ secrets.BOT_GITHUB_USERNAME }} | ||||
|   GIT_EMAIL: ${{ secrets.BOT_GITHUB_EMAIL }} | ||||
|   GIT_PASSWORD: ${{ secrets.BOT_GITHUB_TOKEN }} | ||||
| @@ -38,8 +37,6 @@ jobs: | ||||
|       - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.24.1 | ||||
|       - uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.24.1 | ||||
|       - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.24.1 | ||||
|         with: | ||||
|           java-version: ${{ env.JAVA_VERSION }} | ||||
|       - name: "Init" | ||||
|         run: bash ./scripts/ci/init.sh | ||||
|       - uses: Alfresco/alfresco-build-tools/.github/actions/configure-git-author@v8.24.1 | ||||
| @@ -69,8 +66,6 @@ jobs: | ||||
|       - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.24.1 | ||||
|       - uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.24.1 | ||||
|       - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.24.1 | ||||
|         with: | ||||
|           java-version: ${{ env.JAVA_VERSION }} | ||||
|       - name: "Init" | ||||
|         run: bash ./scripts/ci/init.sh | ||||
|       - uses: Alfresco/alfresco-build-tools/.github/actions/configure-git-author@v8.24.1 | ||||
|   | ||||
| @@ -133,7 +133,7 @@ | ||||
|         "filename": ".github/workflows/master_release.yml", | ||||
|         "hashed_secret": "3e26d6750975d678acb8fa35a0f69237881576b0", | ||||
|         "is_verified": false, | ||||
|         "line_number": 25, | ||||
|         "line_number": 24, | ||||
|         "is_secret": false | ||||
|       } | ||||
|     ], | ||||
| @@ -1845,5 +1845,5 @@ | ||||
|       } | ||||
|     ] | ||||
|   }, | ||||
|   "generated_at": "2025-09-04T08:27:43Z" | ||||
|   "generated_at": "2025-06-09T16:43:14Z" | ||||
| } | ||||
|   | ||||
| @@ -7,7 +7,7 @@ | ||||
|    <parent> | ||||
|       <groupId>org.alfresco</groupId> | ||||
|       <artifactId>alfresco-community-repo-amps</artifactId> | ||||
|       <version>25.3.0.33-SNAPSHOT</version> | ||||
|       <version>25.3.0.25-SNAPSHOT</version> | ||||
|    </parent> | ||||
|  | ||||
|    <modules> | ||||
|   | ||||
| @@ -7,7 +7,7 @@ | ||||
|    <parent> | ||||
|       <groupId>org.alfresco</groupId> | ||||
|       <artifactId>alfresco-governance-services-community-parent</artifactId> | ||||
|       <version>25.3.0.33-SNAPSHOT</version> | ||||
|       <version>25.3.0.25-SNAPSHOT</version> | ||||
|    </parent> | ||||
|  | ||||
|    <modules> | ||||
|   | ||||
| @@ -7,7 +7,7 @@ | ||||
|    <parent> | ||||
|       <groupId>org.alfresco</groupId> | ||||
|       <artifactId>alfresco-governance-services-automation-community-repo</artifactId> | ||||
|       <version>25.3.0.33-SNAPSHOT</version> | ||||
|       <version>25.3.0.25-SNAPSHOT</version> | ||||
|    </parent> | ||||
|  | ||||
|    <build> | ||||
| @@ -88,7 +88,7 @@ | ||||
|       <dependency> | ||||
|          <groupId>com.github.docker-java</groupId> | ||||
|          <artifactId>docker-java</artifactId> | ||||
|          <version>3.4.0</version> | ||||
|          <version>3.6.0</version> | ||||
|          <exclusions> | ||||
|             <exclusion> | ||||
|                <groupId>org.bouncycastle</groupId> | ||||
|   | ||||
| @@ -43,7 +43,7 @@ import com.github.dockerjava.core.command.LogContainerResultCallback; | ||||
| import com.github.dockerjava.netty.NettyDockerCmdExecFactory; | ||||
| import lombok.Getter; | ||||
| import lombok.Setter; | ||||
| import org.apache.commons.lang3.SystemUtils; | ||||
| import org.apache.commons.lang.SystemUtils; | ||||
| import org.slf4j.Logger; | ||||
| import org.slf4j.LoggerFactory; | ||||
| import org.springframework.beans.factory.annotation.Autowired; | ||||
|   | ||||
| @@ -37,7 +37,7 @@ import static org.alfresco.rest.rm.community.util.CommonTestUtils.generateTestPr | ||||
|  | ||||
| import java.util.Collections; | ||||
|  | ||||
| import org.apache.commons.lang3.StringUtils; | ||||
| import org.apache.commons.lang.StringUtils; | ||||
| import org.json.JSONObject; | ||||
| import org.springframework.beans.factory.annotation.Autowired; | ||||
| import org.testng.annotations.Test; | ||||
| @@ -56,7 +56,7 @@ import org.alfresco.test.AlfrescoTest; | ||||
|  | ||||
| /** | ||||
|  * Add Relationship tests | ||||
|  * | ||||
|  *  | ||||
|  * @author Kavit Shah | ||||
|  */ | ||||
| public class AddRelationshipTests extends BaseRMRestTest | ||||
|   | ||||
| @@ -45,7 +45,7 @@ import java.time.Instant; | ||||
| import java.util.ArrayList; | ||||
| import java.util.List; | ||||
|  | ||||
| import org.apache.commons.lang3.StringUtils; | ||||
| import org.apache.commons.lang.StringUtils; | ||||
| import org.apache.http.HttpEntity; | ||||
| import org.apache.http.HttpResponse; | ||||
| import org.apache.http.HttpStatus; | ||||
|   | ||||
| @@ -7,7 +7,7 @@ | ||||
|    <parent> | ||||
|       <groupId>org.alfresco</groupId> | ||||
|       <artifactId>alfresco-governance-services-community-parent</artifactId> | ||||
|       <version>25.3.0.33-SNAPSHOT</version> | ||||
|       <version>25.3.0.25-SNAPSHOT</version> | ||||
|    </parent> | ||||
|  | ||||
|    <modules> | ||||
|   | ||||
| @@ -8,7 +8,7 @@ | ||||
|    <parent> | ||||
|       <groupId>org.alfresco</groupId> | ||||
|       <artifactId>alfresco-governance-services-community-repo-parent</artifactId> | ||||
|       <version>25.3.0.33-SNAPSHOT</version> | ||||
|       <version>25.3.0.25-SNAPSHOT</version> | ||||
|    </parent> | ||||
|  | ||||
|    <properties> | ||||
|   | ||||
| @@ -7,7 +7,7 @@ | ||||
|     <parent> | ||||
|         <groupId>org.alfresco</groupId> | ||||
|         <artifactId>alfresco-governance-services-community-repo-parent</artifactId> | ||||
|         <version>25.3.0.33-SNAPSHOT</version> | ||||
|         <version>25.3.0.25-SNAPSHOT</version> | ||||
|     </parent> | ||||
|  | ||||
|     <build> | ||||
|   | ||||
| @@ -7,7 +7,7 @@ | ||||
|     <parent> | ||||
|         <groupId>org.alfresco</groupId> | ||||
|         <artifactId>alfresco-community-repo</artifactId> | ||||
|         <version>25.3.0.33-SNAPSHOT</version> | ||||
|         <version>25.3.0.25-SNAPSHOT</version> | ||||
|     </parent> | ||||
|  | ||||
|     <modules> | ||||
|   | ||||
| @@ -8,7 +8,7 @@ | ||||
|     <parent> | ||||
|         <groupId>org.alfresco</groupId> | ||||
|         <artifactId>alfresco-community-repo-amps</artifactId> | ||||
|         <version>25.3.0.33-SNAPSHOT</version> | ||||
|         <version>25.3.0.25-SNAPSHOT</version> | ||||
|     </parent> | ||||
|  | ||||
|     <properties> | ||||
| @@ -51,8 +51,8 @@ | ||||
|             </exclusions> | ||||
|         </dependency> | ||||
|         <dependency> | ||||
|             <groupId>org.apache.commons</groupId> | ||||
|             <artifactId>commons-lang3</artifactId> | ||||
|             <groupId>commons-lang</groupId> | ||||
|             <artifactId>commons-lang</artifactId> | ||||
|             <scope>provided</scope> | ||||
|         </dependency> | ||||
|  | ||||
|   | ||||
| @@ -28,7 +28,7 @@ import java.util.ResourceBundle; | ||||
| import java.util.regex.Matcher; | ||||
| import java.util.regex.Pattern; | ||||
|  | ||||
| import org.apache.commons.lang3.StringEscapeUtils; | ||||
| import org.apache.commons.lang.StringEscapeUtils; | ||||
| import org.json.simple.JSONObject; | ||||
| import org.springframework.extensions.webscripts.Cache; | ||||
| import org.springframework.extensions.webscripts.Status; | ||||
| @@ -92,7 +92,7 @@ public class WikiPageGet extends AbstractWikiWebScript | ||||
|                 { | ||||
|                     links.add(link); | ||||
|                     // build the list of available pages | ||||
|                     WikiPageInfo wikiPage = wikiService.getWikiPage(site.getShortName(), StringEscapeUtils.unescapeHtml4(link)); | ||||
|                     WikiPageInfo wikiPage = wikiService.getWikiPage(site.getShortName(), StringEscapeUtils.unescapeHtml(link)); | ||||
|                     if (wikiPage != null) | ||||
|                     { | ||||
|                         pageTitles.add(wikiPage.getTitle()); | ||||
|   | ||||
| @@ -91,15 +91,6 @@ function doclist_getAllNodes(parsedArgs, filterParams, query, totalItemCount) | ||||
|    }; | ||||
| } | ||||
|  | ||||
| function sanitizeJunkFavouriteKeys(favourites){ | ||||
|    for (var key in favourites) { | ||||
|       if (!key || key.trim() === "") { | ||||
|          delete favourites[key]; | ||||
|       } | ||||
|    } | ||||
|    return favourites; | ||||
| } | ||||
|  | ||||
| /** | ||||
|  * Main entry point: Create collection of documents and folders in the given space | ||||
|  * | ||||
| @@ -132,28 +123,6 @@ function doclist_main() | ||||
|     | ||||
|    if (logger.isLoggingEnabled()) | ||||
|       logger.log("doclist.lib.js - NodeRef: " + parsedArgs.nodeRef + " Query: " + query); | ||||
|  | ||||
|    favourites = sanitizeJunkFavouriteKeys(favourites); | ||||
|  | ||||
|    if(Object.keys(favourites).length === 0 && query === null) | ||||
|    { | ||||
|       return { | ||||
|          luceneQuery: "", | ||||
|          paging: { | ||||
|             totalRecords: 0, | ||||
|             startIndex: 0 | ||||
|          }, | ||||
|          container: parsedArgs.rootNode, | ||||
|          parent: null, | ||||
|          onlineEditing: utils.moduleInstalled("org.alfresco.module.vti"), | ||||
|          itemCount: { | ||||
|             folders: 0, | ||||
|             documents: 0 | ||||
|          }, | ||||
|          items: [], | ||||
|          customJSON: slingshotDocLib.getJSON() | ||||
|       }; | ||||
|    } | ||||
|     | ||||
|    var totalItemCount = filterParams.limitResults ? parseInt(filterParams.limitResults, 10) : -1; | ||||
|    // For all sites documentLibrary query we pull in all available results and post filter | ||||
|   | ||||
| @@ -182,14 +182,11 @@ var Filters = | ||||
|          case "favourites": | ||||
|             for (var favourite in favourites) | ||||
|             { | ||||
|                if (favourite && favourite.trim() !== "") | ||||
|                if (filterQuery) | ||||
|                { | ||||
|                   if (filterQuery) | ||||
|                   { | ||||
|                      filterQuery += " OR "; | ||||
|                   } | ||||
|                   filterQuery += "ID:\"" + favourite + "\""; | ||||
|                   filterQuery += " OR "; | ||||
|                } | ||||
|                filterQuery += "ID:\"" + favourite + "\""; | ||||
|             } | ||||
|              | ||||
|             if (filterQuery.length !== 0) | ||||
| @@ -204,13 +201,7 @@ var Filters = | ||||
|             else | ||||
|             { | ||||
|                // empty favourites query | ||||
|                logger.warn("No favourites found for user: " + person.properties.userName); | ||||
|                return { | ||||
|                   query: null, | ||||
|                   limitResults: 0, | ||||
|                   sort: [], | ||||
|                   language: "lucene" | ||||
|                }; | ||||
|                filterQuery = "+ID:\"\""; | ||||
|             } | ||||
|              | ||||
|             filterParams.query = filterQuery; | ||||
|   | ||||
| @@ -25,7 +25,7 @@ import java.util.regex.Matcher; | ||||
| import java.util.regex.Pattern; | ||||
| import jakarta.transaction.UserTransaction; | ||||
|  | ||||
| import org.apache.commons.lang3.StringEscapeUtils; | ||||
| import org.apache.commons.lang.StringEscapeUtils; | ||||
| import org.apache.commons.logging.Log; | ||||
| import org.apache.commons.logging.LogFactory; | ||||
| import org.json.JSONArray; | ||||
| @@ -958,7 +958,7 @@ public class WikiRestApiTest extends BaseWebScriptTest | ||||
|                 String link = m.group(1); | ||||
|                 link += "?title=<script>alert('xss');</script>"; | ||||
|                 WikiPageInfo wikiPage2 = this.wikiService.getWikiPage(SITE_SHORT_NAME_WIKI, link); | ||||
|                 WikiPageInfo wikiPage1 = this.wikiService.getWikiPage(SITE_SHORT_NAME_WIKI, StringEscapeUtils.unescapeHtml4(link)); | ||||
|                 WikiPageInfo wikiPage1 = this.wikiService.getWikiPage(SITE_SHORT_NAME_WIKI, StringEscapeUtils.unescapeHtml(link)); | ||||
|                 assertEquals(wikiPage2, wikiPage1); | ||||
|             } | ||||
|  | ||||
|   | ||||
| @@ -7,7 +7,7 @@ | ||||
|    <parent> | ||||
|       <groupId>org.alfresco</groupId> | ||||
|       <artifactId>alfresco-community-repo</artifactId> | ||||
|       <version>25.3.0.33-SNAPSHOT</version> | ||||
|       <version>25.3.0.25-SNAPSHOT</version> | ||||
|    </parent> | ||||
|  | ||||
|    <dependencies> | ||||
|   | ||||
| @@ -7,7 +7,7 @@ | ||||
|     <parent> | ||||
|         <groupId>org.alfresco</groupId> | ||||
|         <artifactId>alfresco-community-repo</artifactId> | ||||
|         <version>25.3.0.33-SNAPSHOT</version> | ||||
|         <version>25.3.0.25-SNAPSHOT</version> | ||||
|     </parent> | ||||
|  | ||||
|     <properties> | ||||
|   | ||||
| @@ -7,7 +7,7 @@ | ||||
|     <parent> | ||||
|         <groupId>org.alfresco</groupId> | ||||
|         <artifactId>alfresco-community-repo</artifactId> | ||||
|         <version>25.3.0.33-SNAPSHOT</version> | ||||
|         <version>25.3.0.25-SNAPSHOT</version> | ||||
|     </parent> | ||||
|  | ||||
|     <dependencies> | ||||
|   | ||||
| @@ -9,6 +9,6 @@ | ||||
|     <parent> | ||||
|         <groupId>org.alfresco</groupId> | ||||
|         <artifactId>alfresco-community-repo-packaging</artifactId> | ||||
|         <version>25.3.0.33-SNAPSHOT</version> | ||||
|         <version>25.3.0.25-SNAPSHOT</version> | ||||
|     </parent> | ||||
| </project> | ||||
|   | ||||
| @@ -37,7 +37,8 @@ commons-fileupload  http://jakarta.apache.org/commons/ | ||||
| commons-httpclient  http://jakarta.apache.org/commons/  | ||||
| commons-io  http://jakarta.apache.org/commons/  | ||||
| commons-jxpath  http://jakarta.apache.org/commons/  | ||||
| commons-lang3   http://jakarta.apache.org/commons/ | ||||
| commons-lang    http://jakarta.apache.org/commons/  | ||||
| commons-lang3   http://jakarta.apache.org/commons/  | ||||
| commons-logging http://jakarta.apache.org/commons/  | ||||
| commons-net http://jakarta.apache.org/commons/ | ||||
| commons-pool    http://jakarta.apache.org/commons/  | ||||
|   | ||||
| @@ -1,5 +1,5 @@ | ||||
| # More infos about this image: https://github.com/Alfresco/alfresco-docker-base-tomcat | ||||
| FROM alfresco/alfresco-base-tomcat:tomcat10-jre21-rockylinux9@sha256:ed568167f4c28efc9db4c5bc44a882ee117c475463b526b21ada99e1b6d568dd | ||||
| FROM alfresco/alfresco-base-tomcat:tomcat10-jre17-rockylinux9@sha256:00d89fb84bda7bb37c17b0117adb2cfe4f7cbddcd6c1e42b0a67ea8dbb41a734 | ||||
| # Set default docker_context. | ||||
| ARG resource_path=target | ||||
|  | ||||
|   | ||||
| @@ -7,7 +7,7 @@ | ||||
|     <parent> | ||||
|         <groupId>org.alfresco</groupId> | ||||
|         <artifactId>alfresco-community-repo-packaging</artifactId> | ||||
|         <version>25.3.0.33-SNAPSHOT</version> | ||||
|         <version>25.3.0.25-SNAPSHOT</version> | ||||
|     </parent> | ||||
|  | ||||
|     <properties> | ||||
|   | ||||
| @@ -7,7 +7,7 @@ | ||||
|     <parent> | ||||
|         <groupId>org.alfresco</groupId> | ||||
|         <artifactId>alfresco-community-repo</artifactId> | ||||
|         <version>25.3.0.33-SNAPSHOT</version> | ||||
|         <version>25.3.0.25-SNAPSHOT</version> | ||||
|     </parent> | ||||
|  | ||||
|     <modules> | ||||
|   | ||||
| @@ -6,7 +6,7 @@ | ||||
|     <parent> | ||||
|         <groupId>org.alfresco</groupId> | ||||
|         <artifactId>alfresco-community-repo-packaging</artifactId> | ||||
|         <version>25.3.0.33-SNAPSHOT</version> | ||||
|         <version>25.3.0.25-SNAPSHOT</version> | ||||
|     </parent> | ||||
|  | ||||
|     <modules> | ||||
|   | ||||
| @@ -7,7 +7,7 @@ | ||||
|     <parent> | ||||
|         <groupId>org.alfresco</groupId> | ||||
|         <artifactId>alfresco-community-repo-tests</artifactId> | ||||
|         <version>25.3.0.33-SNAPSHOT</version> | ||||
|         <version>25.3.0.25-SNAPSHOT</version> | ||||
|     </parent> | ||||
|  | ||||
|     <organization> | ||||
| @@ -16,11 +16,11 @@ | ||||
|     </organization> | ||||
|  | ||||
|     <properties> | ||||
|         <maven.build.sourceVersion>21</maven.build.sourceVersion> | ||||
|         <maven.build.sourceVersion>17</maven.build.sourceVersion> | ||||
|         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||||
|         <maven-jar-plugin.version>3.1.1</maven-jar-plugin.version> | ||||
|         <maven-release.version>2.5.3</maven-release.version> | ||||
|         <java.version>21</java.version> | ||||
|         <java.version>17</java.version> | ||||
|         <suiteXmlFile>${project.basedir}/src/test/resources/cmis-suite.xml</suiteXmlFile> | ||||
|         <cmis.binding /> | ||||
|         <cmis.basePath /> | ||||
|   | ||||
| @@ -5,7 +5,7 @@ import java.util.Date; | ||||
| import org.apache.chemistry.opencmis.commons.exceptions.CmisObjectNotFoundException; | ||||
| import org.apache.chemistry.opencmis.commons.exceptions.CmisPermissionDeniedException; | ||||
| import org.apache.chemistry.opencmis.commons.exceptions.CmisUnauthorizedException; | ||||
| import org.apache.commons.lang3.time.DateUtils; | ||||
| import org.apache.commons.lang.time.DateUtils; | ||||
| import org.testng.annotations.BeforeClass; | ||||
| import org.testng.annotations.Test; | ||||
|  | ||||
|   | ||||
| @@ -9,7 +9,7 @@ | ||||
|     <parent> | ||||
|         <groupId>org.alfresco</groupId> | ||||
|         <artifactId>alfresco-community-repo-tests</artifactId> | ||||
|         <version>25.3.0.33-SNAPSHOT</version> | ||||
|         <version>25.3.0.25-SNAPSHOT</version> | ||||
|     </parent> | ||||
|  | ||||
|     <developers> | ||||
|   | ||||
| @@ -9,7 +9,7 @@ | ||||
|     <parent> | ||||
|         <groupId>org.alfresco</groupId> | ||||
|         <artifactId>alfresco-community-repo-tests</artifactId> | ||||
|         <version>25.3.0.33-SNAPSHOT</version> | ||||
|         <version>25.3.0.25-SNAPSHOT</version> | ||||
|     </parent> | ||||
|  | ||||
|     <developers> | ||||
|   | ||||
| @@ -8,18 +8,18 @@ | ||||
|     <parent> | ||||
|         <groupId>org.alfresco</groupId> | ||||
|         <artifactId>alfresco-community-repo-tests</artifactId> | ||||
|         <version>25.3.0.33-SNAPSHOT</version> | ||||
|         <version>25.3.0.25-SNAPSHOT</version> | ||||
|     </parent> | ||||
|  | ||||
|     <properties> | ||||
|         <suiteXmlFile>${project.basedir}/src/test/resources/restapi-suite.xml</suiteXmlFile> | ||||
|         <maven.build.sourceVersion>21</maven.build.sourceVersion> | ||||
|         <maven.build.sourceVersion>17</maven.build.sourceVersion> | ||||
|         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||||
|         <rest.api.explorer.branch>master</rest.api.explorer.branch> | ||||
|         <httpclient-osgi-version>4.5.6</httpclient-osgi-version> | ||||
|         <commons-lang3.version>3.18.0</commons-lang3.version> | ||||
|         <scribejava-apis.version>8.3.3</scribejava-apis.version> | ||||
|         <java.version>21</java.version> | ||||
|         <java.version>17</java.version> | ||||
|     </properties> | ||||
|  | ||||
|     <profiles> | ||||
|   | ||||
| @@ -9,7 +9,7 @@ | ||||
|     <parent> | ||||
|         <groupId>org.alfresco</groupId> | ||||
|         <artifactId>alfresco-community-repo-tests</artifactId> | ||||
|         <version>25.3.0.33-SNAPSHOT</version> | ||||
|         <version>25.3.0.25-SNAPSHOT</version> | ||||
|     </parent> | ||||
|  | ||||
|     <developers> | ||||
|   | ||||
| @@ -7,7 +7,7 @@ | ||||
|     <parent> | ||||
|         <groupId>org.alfresco</groupId> | ||||
|         <artifactId>alfresco-community-repo-packaging</artifactId> | ||||
|         <version>25.3.0.33-SNAPSHOT</version> | ||||
|         <version>25.3.0.25-SNAPSHOT</version> | ||||
|     </parent> | ||||
|  | ||||
|     <properties> | ||||
|   | ||||
							
								
								
									
										14
									
								
								pom.xml
									
									
									
									
									
								
							
							
						
						
									
										14
									
								
								pom.xml
									
									
									
									
									
								
							| @@ -2,7 +2,7 @@ | ||||
| <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||||
|     <modelVersion>4.0.0</modelVersion> | ||||
|     <artifactId>alfresco-community-repo</artifactId> | ||||
|     <version>25.3.0.33-SNAPSHOT</version> | ||||
|     <version>25.3.0.25-SNAPSHOT</version> | ||||
|     <packaging>pom</packaging> | ||||
|     <name>Alfresco Community Repo Parent</name> | ||||
|  | ||||
| @@ -38,7 +38,7 @@ | ||||
|         <builder.name>entitled-builder</builder.name> | ||||
|         <local.registry>127.0.0.1:5000</local.registry> | ||||
|  | ||||
|         <java.version>21</java.version> | ||||
|         <java.version>17</java.version> | ||||
|         <maven.compiler.source>${java.version}</maven.compiler.source> | ||||
|         <maven.compiler.target>${java.version}</maven.compiler.target> | ||||
|         <maven.build.sourceVersion>${java.version}</maven.build.sourceVersion> | ||||
| @@ -51,8 +51,8 @@ | ||||
|         <dependency.alfresco-server-root.version>7.0.2</dependency.alfresco-server-root.version> | ||||
|         <dependency.activiti-engine.version>5.23.0</dependency.activiti-engine.version> | ||||
|         <dependency.activiti.version>5.23.0</dependency.activiti.version> | ||||
|         <dependency.alfresco-transform-core.version>5.2.1</dependency.alfresco-transform-core.version> | ||||
|         <dependency.alfresco-transform-service.version>4.2.1</dependency.alfresco-transform-service.version> | ||||
|         <dependency.alfresco-transform-core.version>5.2.1-A.3</dependency.alfresco-transform-core.version> | ||||
|         <dependency.alfresco-transform-service.version>4.2.1-A.4</dependency.alfresco-transform-service.version> | ||||
|         <dependency.alfresco-greenmail.version>7.1</dependency.alfresco-greenmail.version> | ||||
|         <dependency.acs-event-model.version>1.0.5</dependency.acs-event-model.version> | ||||
|  | ||||
| @@ -422,9 +422,9 @@ | ||||
|                 <version>1.18.0</version> | ||||
|             </dependency> | ||||
|             <dependency> | ||||
|                 <groupId>org.apache.commons</groupId> | ||||
|                 <artifactId>commons-lang3</artifactId> | ||||
|                 <version>3.18.0</version> | ||||
|                 <groupId>commons-lang</groupId> | ||||
|                 <artifactId>commons-lang</artifactId> | ||||
|                 <version>2.6</version> | ||||
|             </dependency> | ||||
|             <dependency> | ||||
|                 <groupId>commons-io</groupId> | ||||
|   | ||||
| @@ -7,7 +7,7 @@ | ||||
|     <parent> | ||||
|         <groupId>org.alfresco</groupId> | ||||
|         <artifactId>alfresco-community-repo</artifactId> | ||||
|         <version>25.3.0.33-SNAPSHOT</version> | ||||
|         <version>25.3.0.25-SNAPSHOT</version> | ||||
|     </parent> | ||||
|  | ||||
|     <dependencies> | ||||
|   | ||||
| @@ -40,7 +40,6 @@ | ||||
| 		"items": | ||||
| 		[ | ||||
| 		<#list results as row> | ||||
| 			<#if row.item.hasPermission("Read")> | ||||
| 			{ | ||||
| 				"type": "${row.item.typeShort}", | ||||
| 				"parentType": "${row.item.parentTypeShort!""}", | ||||
| @@ -76,7 +75,6 @@ | ||||
| 				"nodeRef": "${row.item.nodeRef}"<#if row.selectable?exists>, | ||||
| 				"selectable" : ${row.selectable?string}</#if> | ||||
| 			}<#if row_has_next>,</#if> | ||||
| 			</#if> | ||||
| 		</#list> | ||||
| 		] | ||||
| 	} | ||||
|   | ||||
| @@ -7,7 +7,7 @@ | ||||
|     <parent> | ||||
|         <groupId>org.alfresco</groupId> | ||||
|         <artifactId>alfresco-community-repo</artifactId> | ||||
|         <version>25.3.0.33-SNAPSHOT</version> | ||||
|         <version>25.3.0.25-SNAPSHOT</version> | ||||
|     </parent> | ||||
|  | ||||
|     <dependencies> | ||||
| @@ -94,6 +94,7 @@ | ||||
|         <dependency> | ||||
|             <groupId>org.apache.commons</groupId> | ||||
|             <artifactId>commons-lang3</artifactId> | ||||
|             <version>3.18.0</version> | ||||
|         </dependency> | ||||
|         <dependency> | ||||
|             <groupId>commons-codec</groupId> | ||||
| @@ -736,6 +737,10 @@ | ||||
|             <artifactId>reflections</artifactId> | ||||
|             <scope>test</scope> | ||||
|         </dependency> | ||||
|         <dependency> | ||||
|             <groupId>commons-lang</groupId> | ||||
|             <artifactId>commons-lang</artifactId> | ||||
|         </dependency> | ||||
|     </dependencies> | ||||
|  | ||||
|     <build> | ||||
| @@ -840,12 +845,12 @@ | ||||
|                     </execution> | ||||
|                 </executions> | ||||
|                 <configuration> | ||||
|                     <complianceLevel>${java.version}</complianceLevel> | ||||
|                     <complianceLevel>17</complianceLevel> | ||||
|                     <outxml>false</outxml> | ||||
|                     <verbose>true</verbose> | ||||
|                     <showWeaveInfo>true</showWeaveInfo> | ||||
|                     <source>${java.version}</source> | ||||
|                     <target>${java.version}</target> | ||||
|                     <source>17</source> | ||||
|                     <target>17</target> | ||||
|                     <additionalCompilerArgs> | ||||
|                         <arg>-parameters</arg> | ||||
|                     </additionalCompilerArgs> | ||||
|   | ||||
| @@ -116,7 +116,7 @@ public class NodeDAOImpl extends AbstractNodeDAOImpl | ||||
|     private static final String SELECT_NODE_MAX_ID = "alfresco.node.select_NodeMaxId"; | ||||
|     private static final String SELECT_NODE_INTERVAL_BY_TYPE = "alfresco.node.select_MinMaxNodeIdForNodeType"; | ||||
|     private static final String SELECT_NODES_WITH_ASPECT_IDS = "alfresco.node.select_NodesWithAspectIds"; | ||||
|     private static final String SELECT_NODES_WITH_ASPECT_IDS_LIMITED = "alfresco.node.select.select_NodesWithAspectIds_Limited"; | ||||
|     private static final String SELECT_NODES_WITH_ASPECT_IDS_LIMITED = "alfresco.node.select_NodesWithAspectIds_Limited"; | ||||
|     private static final String INSERT_NODE_ASSOC = "alfresco.node.insert.insert_NodeAssoc"; | ||||
|     private static final String UPDATE_NODE_ASSOC = "alfresco.node.update_NodeAssoc"; | ||||
|     private static final String DELETE_NODE_ASSOC = "alfresco.node.delete_NodeAssoc"; | ||||
|   | ||||
| @@ -2,7 +2,7 @@ | ||||
|  * #%L | ||||
|  * Alfresco Repository | ||||
|  * %% | ||||
|  * Copyright (C) 2005 - 2025 Alfresco Software Limited | ||||
|  * Copyright (C) 2005 - 2016 Alfresco Software Limited | ||||
|  * %% | ||||
|  * This file is part of the Alfresco software.  | ||||
|  * If the software was purchased under a paid Alfresco license, the terms of  | ||||
| @@ -124,9 +124,6 @@ public class RhinoScriptProcessor extends BaseProcessor implements ScriptProcess | ||||
|     /** Number of (bytecode) instructions that will trigger the observer */ | ||||
|     private int observerInstructionCount = 100; | ||||
|  | ||||
|     /** Flag to enable or disable scope cleaning at the end of each script execution */ | ||||
|     private boolean cleanScope = true; | ||||
|  | ||||
|     /** Custom context factory */ | ||||
|     public static AlfrescoContextFactory contextFactory; | ||||
|  | ||||
| @@ -213,15 +210,6 @@ public class RhinoScriptProcessor extends BaseProcessor implements ScriptProcess | ||||
|         this.observerInstructionCount = observerInstructionCount; | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * @param cleanScope | ||||
|      *            true to enable scope cleaning at the end of each script execution - set to false to disable this feature. | ||||
|      */ | ||||
|     public void setCleanScope(boolean cleanScope) | ||||
|     { | ||||
|         this.cleanScope = cleanScope; | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * @see org.alfresco.service.cmr.repository.ScriptProcessor#reset() | ||||
|      */ | ||||
| @@ -631,7 +619,7 @@ public class RhinoScriptProcessor extends BaseProcessor implements ScriptProcess | ||||
|         } | ||||
|         finally | ||||
|         { | ||||
|             if (!secure && cleanScope) | ||||
|             if (!secure) | ||||
|             { | ||||
|                 unsetScope(model, scope); | ||||
|             } | ||||
|   | ||||
| @@ -81,19 +81,11 @@ public class RenditionService2Impl implements RenditionService2, InitializingBea | ||||
|  | ||||
|     public static final QName DEFAULT_RENDITION_CONTENT_PROP = ContentModel.PROP_CONTENT; | ||||
|     public static final String DEFAULT_MIMETYPE = MimetypeMap.MIMETYPE_TEXT_PLAIN; | ||||
|     public static final String MIMETYPE_METADATA_EXTRACT = "alfresco-metadata-extract"; | ||||
|     public static final String MIMETYPE_METADATA_EMBED = "alfresco-metadata-embed"; | ||||
|     public static final String DEFAULT_ENCODING = "UTF-8"; | ||||
|  | ||||
|     public static final int SOURCE_HAS_NO_CONTENT = -1; | ||||
|     public static final int RENDITION2_DOES_NOT_EXIST = -2; | ||||
|  | ||||
|     // Allowed mimetypes to support text or metadata extract transforms when thumbnails are disabled. | ||||
|     private static final Set<String> ALLOWED_MIMETYPES = Set.of( | ||||
|             MimetypeMap.MIMETYPE_TEXT_PLAIN, | ||||
|             MIMETYPE_METADATA_EXTRACT, | ||||
|             MIMETYPE_METADATA_EMBED); | ||||
|  | ||||
|     private static Log logger = LogFactory.getLog(RenditionService2Impl.class); | ||||
|  | ||||
|     // As Async transforms and renditions are so similar, this class provides a way to provide the code that is different. | ||||
| @@ -296,7 +288,7 @@ public class RenditionService2Impl implements RenditionService2, InitializingBea | ||||
|     { | ||||
|         try | ||||
|         { | ||||
|             if (!isAsyncAllowed(renderOrTransform)) | ||||
|             if (!isEnabled()) | ||||
|             { | ||||
|                 throw new RenditionService2Exception("Async transforms and renditions are disabled " + | ||||
|                         "(system.thumbnail.generate=false or renditionService2.enabled=false)."); | ||||
| @@ -975,24 +967,4 @@ public class RenditionService2Impl implements RenditionService2, InitializingBea | ||||
|             } | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     // Checks if the given transform callback is a text extract transform for content indexing or metadata extract/embed. | ||||
|     private boolean isTextOrMetadataExtractTransform(RenderOrTransformCallBack renderOrTransform) | ||||
|     { | ||||
|         RenditionDefinition2 renditionDefinition = renderOrTransform.getRenditionDefinition(); | ||||
|         return renditionDefinition != null && ALLOWED_MIMETYPES.contains(renditionDefinition.getTargetMimetype()); | ||||
|     } | ||||
|  | ||||
|     private boolean isAsyncAllowed(RenderOrTransformCallBack renderOrTransform) | ||||
|     { | ||||
|         // If enabled is false, all async transforms/renditions must be blocked | ||||
|         if (!enabled) | ||||
|         { | ||||
|             return false; | ||||
|         } | ||||
|  | ||||
|         // If thumbnails are disabled, allow only text extract or metadata extract/embed transforms | ||||
|         return thumbnailsEnabled || isTextOrMetadataExtractTransform(renderOrTransform); | ||||
|     } | ||||
|  | ||||
| } | ||||
|   | ||||
| @@ -74,7 +74,7 @@ import com.nimbusds.oauth2.sdk.id.Identifier; | ||||
| import com.nimbusds.oauth2.sdk.id.Issuer; | ||||
| import com.nimbusds.openid.connect.sdk.claims.PersonClaims; | ||||
| import com.nimbusds.openid.connect.sdk.op.OIDCProviderMetadata; | ||||
| import org.apache.commons.lang3.StringUtils; | ||||
| import org.apache.commons.lang.StringUtils; | ||||
| import org.apache.commons.logging.Log; | ||||
| import org.apache.commons.logging.LogFactory; | ||||
| import org.apache.hc.client5.http.classic.HttpClient; | ||||
|   | ||||
| @@ -42,7 +42,7 @@ import jakarta.servlet.http.HttpServletResponse; | ||||
| import com.nimbusds.oauth2.sdk.Scope; | ||||
| import com.nimbusds.oauth2.sdk.id.Identifier; | ||||
| import com.nimbusds.oauth2.sdk.id.State; | ||||
| import org.apache.commons.lang3.StringUtils; | ||||
| import org.apache.commons.lang.StringUtils; | ||||
| import org.slf4j.Logger; | ||||
| import org.slf4j.LoggerFactory; | ||||
| import org.springframework.security.oauth2.client.registration.ClientRegistration; | ||||
|   | ||||
| @@ -782,6 +782,25 @@ | ||||
|         <if test="ordered == true">order by node.id ASC</if> | ||||
|     </select> | ||||
|  | ||||
|     <select id="select_NodesWithAspectIds_Limited" parameterType="Ids" resultMap="result_NodeRef" > | ||||
|         select | ||||
|             node.id             as id, | ||||
|             store.protocol      as protocol, | ||||
|             store.identifier    as identifier, | ||||
|             node.uuid           as uuid | ||||
|         from | ||||
|             alf_node_aspects na | ||||
|             join alf_node node on (na.node_id = node.id) | ||||
|             left join alf_store store on (store.id = node.store_id) | ||||
|         where | ||||
|             <![CDATA[na.node_id >= #{idOne}]]> | ||||
|             <if test="idTwo != null"><![CDATA[and na.node_id < #{idTwo}]]></if> | ||||
|             and na.qname_id in | ||||
|                 <foreach item="item" index="i" collection="ids" open="(" separator="," close=")">#{item}</foreach> | ||||
|         <if test="ordered == true">order by node.id ASC</if> | ||||
|         <if test="maxResults != null"><![CDATA[limit #{maxResults}]]></if> | ||||
|     </select> | ||||
|  | ||||
|     <!-- Common results for result_NodeAssoc --> | ||||
|     <sql id="select_NodeAssoc_Results"> | ||||
|         select | ||||
| @@ -1547,4 +1566,4 @@ | ||||
|         </foreach> | ||||
|     </delete> | ||||
|          | ||||
| </mapper> | ||||
| </mapper> | ||||
| @@ -30,23 +30,4 @@ | ||||
|       <![CDATA[and commit_time_ms <= #{maxCommitTime}]]> | ||||
|     </select> | ||||
|  | ||||
|     <select id="select_NodesWithAspectIds_Limited" parameterType="Ids" resultMap="alfresco.node.result_NodeRef" > | ||||
|         select | ||||
|             node.id             as id, | ||||
|             store.protocol      as protocol, | ||||
|             store.identifier    as identifier, | ||||
|             node.uuid           as uuid | ||||
|         from | ||||
|             alf_node_aspects na | ||||
|             join alf_node node on (na.node_id = node.id) | ||||
|             left join alf_store store on (store.id = node.store_id) | ||||
|         where | ||||
|             <![CDATA[na.node_id >= #{idOne}]]> | ||||
|             <if test="idTwo != null"><![CDATA[and na.node_id < #{idTwo}]]></if> | ||||
|             and na.qname_id in | ||||
|                 <foreach item="item" index="i" collection="ids" open="(" separator="," close=")">#{item}</foreach> | ||||
|         <if test="ordered == true">order by node.id ASC</if> | ||||
|         <if test="maxResults != null"><![CDATA[limit #{maxResults}]]></if> | ||||
|     </select> | ||||
|  | ||||
| </mapper> | ||||
| </mapper> | ||||
| @@ -30,23 +30,4 @@ | ||||
|       <![CDATA[and commit_time_ms <= #{maxCommitTime}]]> | ||||
|     </select> | ||||
|  | ||||
|     <select id="select_NodesWithAspectIds_Limited" parameterType="Ids" resultMap="alfresco.node.result_NodeRef" > | ||||
|         select | ||||
|             node.id             as id, | ||||
|             store.protocol      as protocol, | ||||
|             store.identifier    as identifier, | ||||
|             node.uuid           as uuid | ||||
|         from | ||||
|             alf_node_aspects na | ||||
|             join alf_node node on (na.node_id = node.id) | ||||
|             left join alf_store store on (store.id = node.store_id) | ||||
|         where | ||||
|             <![CDATA[na.node_id >= #{idOne}]]> | ||||
|             <if test="idTwo != null"><![CDATA[and na.node_id < #{idTwo}]]></if> | ||||
|             and na.qname_id in | ||||
|                 <foreach item="item" index="i" collection="ids" open="(" separator="," close=")">#{item}</foreach> | ||||
|         <if test="ordered == true">order by node.id ASC</if> | ||||
|         <if test="maxResults != null"><![CDATA[limit #{maxResults}]]></if> | ||||
|     </select> | ||||
|  | ||||
| </mapper> | ||||
| </mapper> | ||||
| @@ -1394,9 +1394,6 @@ scripts.execution.maxMemoryUsedInBytes=-1 | ||||
| # Number of instructions that will trigger the observer | ||||
| scripts.execution.observerInstructionCount=5000 | ||||
|  | ||||
| # Flag to control if the scope is cleaned at the end of script execution | ||||
| scripts.execution.clean.scope=true | ||||
|  | ||||
| # Default value being used in POST/size-details endpoint to partition a huge folder into smaller chunks | ||||
| # so that we can compute more efficiently and consolidate all sizes into a single unit. | ||||
| default.async.folder.items=1000 | ||||
|   | ||||
| @@ -60,9 +60,6 @@ | ||||
|         <property name="observerInstructionCount"> | ||||
|             <value>${scripts.execution.observerInstructionCount}</value> | ||||
|         </property> | ||||
|         <property name="cleanScope"> | ||||
|             <value>${scripts.execution.clean.scope}</value> | ||||
|         </property> | ||||
|     </bean> | ||||
|  | ||||
|     <!-- base config implementation that script extension beans extend from - for auto registration | ||||
|   | ||||
| @@ -39,7 +39,6 @@ import org.junit.Test; | ||||
|  | ||||
| import org.alfresco.model.ContentModel; | ||||
| import org.alfresco.model.RenditionModel; | ||||
| import org.alfresco.repo.content.MimetypeMap; | ||||
| import org.alfresco.repo.security.authentication.AuthenticationUtil; | ||||
| import org.alfresco.repo.security.permissions.AccessDeniedException; | ||||
| import org.alfresco.service.cmr.repository.ChildAssociationRef; | ||||
| @@ -777,58 +776,4 @@ public class RenditionService2IntegrationTest extends AbstractRenditionIntegrati | ||||
|         } | ||||
|  | ||||
|     } | ||||
|  | ||||
|     @Test | ||||
|     public void testTextExtractTransformAllowedWhenThumbnailDisabled() | ||||
|     { | ||||
|         // create a source node | ||||
|         NodeRef sourceNodeRef = createSource(ADMIN, "quick.pdf"); | ||||
|         assertNotNull("Node not generated", sourceNodeRef); | ||||
|         String replyQueue = "org.test.queue"; | ||||
|         String targetMimetype = MimetypeMap.MIMETYPE_TEXT_PLAIN; | ||||
|  | ||||
|         TransformDefinition textExtractTransform = new TransformDefinition( | ||||
|                 targetMimetype, | ||||
|                 java.util.Collections.emptyMap(), | ||||
|                 "clientData", | ||||
|                 replyQueue, | ||||
|                 "requestId"); | ||||
|  | ||||
|         renditionService2.setThumbnailsEnabled(false); | ||||
|         try | ||||
|         { | ||||
|             // Should NOT throw, as this is a text extract transform | ||||
|             AuthenticationUtil.runAs(() -> { | ||||
|                 transactionService.getRetryingTransactionHelper().doInTransaction(() -> { | ||||
|                     renditionService2.transform(sourceNodeRef, textExtractTransform); | ||||
|                     return null; | ||||
|                 }); | ||||
|                 return null; | ||||
|             }, ADMIN); | ||||
|         } | ||||
|         finally | ||||
|         { | ||||
|             renditionService2.setThumbnailsEnabled(true); | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     @Test | ||||
|     public void testMetadataExtractTransformAllowedWhenThumbnailDisabled() | ||||
|     { | ||||
|         // create a source node | ||||
|         NodeRef sourceNodeRef = createSource(ADMIN, "quick.pdf"); | ||||
|         assertNotNull("Node not generated", sourceNodeRef); | ||||
|         renditionService2.setThumbnailsEnabled(false); | ||||
|         try | ||||
|         { | ||||
|             // Should NOT throw, as this is a metadata extract transform | ||||
|             extract(ADMIN, sourceNodeRef); | ||||
|             waitForExtract(ADMIN, sourceNodeRef, true); | ||||
|         } | ||||
|         finally | ||||
|         { | ||||
|             renditionService2.setThumbnailsEnabled(true); | ||||
|         } | ||||
|     } | ||||
|  | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user