Git Product home page Git Product logo

alfresco / alfresco-community-repo Goto Github PK

View Code? Open in Web Editor NEW
130.0 63.0 79.0 372.44 MB

Community Content Service Repository

Home Page: https://www.alfresco.com/it/ecm-software/alfresco-community-edition

License: GNU Lesser General Public License v3.0

Java 96.56% GAP 0.17% Shell 0.03% Dockerfile 0.01% CSS 0.06% XSLT 0.10% JavaScript 1.02% HTML 0.51% FreeMarker 1.53% Batchfile 0.01% Fluent 0.01% Python 0.01%
content-management document-management alfresco

alfresco-community-repo's Introduction

alfresco-community-repo

Build Status

Table of Contents

  1. Content
  2. Artifacts
  3. Setup
  4. Branches
  5. Contributing
  6. Helpful links

Content

Alfresco Community Repository contains following libraries:

Alfresco Core

Core is a library packaged as a jar file which contains the following:

  • Various helpers and utils
  • Canned queries interface and supporting classes
  • Generic encryption supporting classes

Alfresco Data Model

Data Model is a library packaged as a jar file which contains the following:

  • Dictionary, Repository and Search Services interfaces
  • Models for data types and Dictionary implementation
  • Parsers

Alfresco Repository

Repository is a library packaged as a jar file which contains the following:

  • DAOs and SQL scripts
  • Various Service implementations
  • Utility classes

Alfresco Remote API

Remote API is a library packaged as a jar file which contains the following:

Artifacts

The artifacts can be obtained by:

<dependency>
  <groupId>org.alfresco</groupId>
  <artifactId>alfresco-core</artifactId>
  <version>version</version>
</dependency>

<dependency>
  <groupId>org.alfresco</groupId>
  <artifactId>alfresco-data-model</artifactId>
  <version>version</version>
</dependency>

<dependency>
  <groupId>org.alfresco</groupId>
  <artifactId>alfresco-repository</artifactId>
  <version>version</version>
</dependency>

<dependency>
  <groupId>org.alfresco</groupId>
  <artifactId>alfresco-remote-api</artifactId>
  <version>version</version>
</dependency>

<dependency>
    <groupId>org.alfresco</groupId>
    <artifactId>content-services-community</artifactId>
    <version>version</version>
    <type>war</type>
</dependency>

and Alfresco maven repository:

<repository>
  <id>alfresco-maven-repo</id>
  <url>https://artifacts.alfresco.com/nexus/content/groups/public</url>
</repository>

The SNAPSHOT versions of the artifact are not published.

Setting up and building your development environment

See the Development Tomcat Environment page which will show you how to try out your repository changes in a local Tomcat instance or using Docker containers.

Branches

This project has a branch for each ACS release. For example the code in ACS 6.2.2 is a branch called release/6.2.2. In addition to the original 6.2.2 release it will also contain Hot Fixes added later. The latest unreleased code is on the master branch. There are also .N branches, such as release/7.1.N on which we gather unreleased fixes for future service pack releases. They do not indicate that one is planned.

For historic reasons the version of artifacts created on each branch do not match the ACS version. For example artifact in ACS 7.2.0 will be 14.<something>.

The enterprise projects which extend the alfresco-community-repo use the same branch names and leading artifact version number.

Contributing guide

Please use this guide to make a contribution to the project.

Helpful links

alfresco-community-repo's People

Contributors

abozianu avatar alandavis avatar alfresco-build avatar ancutam avatar andyhind avatar anechifor avatar antoniojfelix avatar cagache avatar cristianturlica avatar davidcognite avatar dcaruana avatar dependabot-preview[bot] avatar dependabot[bot] avatar ehardon avatar eknidev avatar epurashu avatar gbroadbent avatar jamalkm avatar killerboot avatar markrogersalfresco avatar michaelsuzukisagi avatar montgolfiere avatar ramunteanu avatar rlucanu avatar rodicasutu avatar roywetherall avatar rpopa avatar rwetherall avatar saraaspery avatar tpage-alfresco avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

alfresco-community-repo's Issues

Alfresco FTP not working

Dear Sir,

I am getting this error
Error from JLAN
java.lang.NullPointerException
at org.alfresco.jlan.ftp.FTPRequest.parseCommandLine(FTPRequest.java:124)
at org.alfresco.jlan.ftp.FTPRequest.(FTPRequest.java:66)
at org.alfresco.jlan.ftp.FTPSrvSession.getNextCommand(FTPSrvSession.java:4577)
at org.alfresco.jlan.ftp.FTPSrvSession.run(FTPSrvSession.java:5043)
at java.lang.Thread.run(Thread.java:748)

Please help me.

Wiki internal links exception.

Since I updated from 5.0.d to 7.1.0, some wiki pages that uses internal links ([[the wiki page]]) are not rendered.
After investigation it seems that the Wiki code uses org/apache/commons/lang/StringEscapeUtils instead of org/apache/commons/lang3/StringEscapeUtils.

After changing to import org.apache.commons.lang3.StringEscapeUtils; and

WikiPageInfo wikiPage = wikiService.getWikiPage(site.getShortName(), StringEscapeUtils.unescapeHtml(link));

to WikiPageInfo wikiPage = wikiService.getWikiPage(site.getShortName(), StringEscapeUtils.unescapeHtml4(link));

It worked as expected.

Metadata extraction doesn't trigger when uploaded files via FTP

Problem: Metadata extraction doesn't trigger when uploaded files via FTP

Installation type:

  • Plain vanilla installation (No customizations at all).
  • Windows 10 x64
  • alfresco-content-services-community-6.2.0-ga
  • Oracle JDK 11.0.4 x64
  • PostgreSQL 11.4
  • ImageMagick v7.0.10
  • LibreOffice v6.3.5

Everything is as per: https://docs.alfresco.com/6.2/concepts/supported-platforms-ACS.html

When i upload an image (for example), via share UI the metadata is getting extracted and metadata is getting applied. But when i upload an image via FTP, nothing happens. Even auditable properties are not changing.

I enabled all the required logs but could not locate anything that says it is trying to extract the metadata. Everything remains silent when uploading the file via FTP. Whereas i see all the required logs and also see metadata extraction happening.

#log configuration:
log4j.logger.org.alfresco.repo.transaction.RetryingTransactionHelper=INFO
log4j.logger.org.alfresco.repo.content.metadata.AbstractMappingMetadataExtracter=DEBUG
log4j.logger.org.alfresco.repo.content.metadata.MetadataExtracterRegistry=DEBUG
log4j.logger.org.alfresco.repo.thumbnail=DEBUG
log4j.logger.org.alfresco.ftp.protocol=debug
log4j.logger.org.alfresco.ftp.server=debug

These are the logs that gets printed when i upload file via share ui, but same doesn't happen via FTP:

DEBUG [org.alfresco.repo.content.metadata.MetadataExtracterRegistry] [http-nio-8080-exec-7] Get extractors for image/png
2020-12-04 16:26:00,976 DEBUG [org.alfresco.repo.content.metadata.MetadataExtracterRegistry] [http-nio-8080-exec-7] Get supported: extracter.TikaAuto
2020-12-04 16:26:00,976 DEBUG [org.alfresco.repo.content.metadata.MetadataExtracterRegistry] [http-nio-8080-exec-7] Get returning: extracter.TikaAuto
2020-12-04 16:26:00,976 DEBUG [org.alfresco.repo.content.metadata.AbstractMappingMetadataExtracter] [http-nio-8080-exec-7] Starting metadata extraction: reader: ContentAccessor[ contentUrl=store://2020/12/4/16/26/1618fdc1-bf70-48c6-827d-3e6226a16686.bin, mimetype=image/png, size=5421, encoding=UTF-8, locale=en_US] extracter: org.alfresco.repo.content.metadata.TikaAutoMetadataExtracter@2f60e43
2020-12-04 16:26:00,976 DEBUG [org.alfresco.repo.content.metadata.AbstractMappingMetadataExtracter] [http-nio-8080-exec-7] Concurrent extractions : 0
2020-12-04 16:26:00,976 DEBUG [org.alfresco.repo.content.metadata.AbstractMappingMetadataExtracter] [http-nio-8080-exec-7] New extraction accepted. Concurrent extractions : 1
2020-12-04 16:26:00,992 DEBUG [org.alfresco.repo.content.metadata.AbstractMappingMetadataExtracter] [http-nio-8080-exec-7] Extraction finalized. Remaining concurrent extraction : 0
2020-12-04 16:26:00,992 DEBUG [org.alfresco.repo.content.metadata.AbstractMappingMetadataExtracter] [http-nio-8080-exec-7] Converted extracted raw values to system values: Raw Properties: {Transparency Alpha=nonpremultipled, tiff:ImageLength=200, Compression CompressionTypeName=deflate, Data BitsPerSample=8 8 8 8, title=null, Data PlanarConfiguration=PixelInterleaved, IHDR=width=200, height=200, bitDepth=8, colorType=RGBAlpha, compressionMethod=deflate, filterMethod=adaptive, interlaceMethod=none, Chroma ColorSpaceType=RGB, tiff:BitsPerSample=8 8 8 8, Content-Type=image/png, height=200, X-Parsed-By=org.apache.tika.parser.DefaultParser, org.apache.tika.parser.image.ImageParser, comments=null, bKGD bKGD_RGB=red=255, green=255, blue=255, dc:subject=null, author=null, Dimension PixelAspectRatio=1.0, Compression NumProgressiveScans=1, Chroma BlackIsZero=true, Compression Lossless=true, width=200, Dimension ImageOrientation=Normal, tiff:ImageWidth=200, Chroma BackgroundColor=red=255, green=255, blue=255, Chroma NumChannels=4, Data SampleFormat=UnsignedIntegral} System Properties: {{http://www.alfresco.org/model/exif/1.0}pixelYDimension=200, {http://www.alfresco.org/model/content/1.0}title=null, {http://www.alfresco.org/model/exif/1.0}pixelXDimension=200, {http://www.alfresco.org/model/content/1.0}author=null}
2020-12-04 16:26:00,997 DEBUG [org.alfresco.repo.content.metadata.AbstractMappingMetadataExtracter] [http-nio-8080-exec-7] Extracted Metadata from ContentAccessor[ contentUrl=store://2020/12/4/16/26/1618fdc1-bf70-48c6-827d-3e6226a16686.bin, mimetype=image/png, size=5421, encoding=UTF-8, locale=en_US] Found: {Transparency Alpha=nonpremultipled, tiff:ImageLength=200, Compression CompressionTypeName=deflate, Data BitsPerSample=8 8 8 8, title=null, Data PlanarConfiguration=PixelInterleaved, IHDR=width=200, height=200, bitDepth=8, colorType=RGBAlpha, compressionMethod=deflate, filterMethod=adaptive, interlaceMethod=none, Chroma ColorSpaceType=RGB, tiff:BitsPerSample=8 8 8 8, Content-Type=image/png, height=200, X-Parsed-By=org.apache.tika.parser.DefaultParser, org.apache.tika.parser.image.ImageParser, comments=null, bKGD bKGD_RGB=red=255, green=255, blue=255, dc:subject=null, author=null, Dimension PixelAspectRatio=1.0, Compression NumProgressiveScans=1, Chroma BlackIsZero=true, Compression Lossless=true, width=200, Dimension ImageOrientation=Normal, tiff:ImageWidth=200, Chroma BackgroundColor=red=255, green=255, blue=255, Chroma NumChannels=4, Data SampleFormat=UnsignedIntegral} Mapped and Accepted: {{http://www.alfresco.org/model/exif/1.0}pixelXDimension=200, {http://www.alfresco.org/model/content/1.0}title=null, {http://www.alfresco.org/model/exif/1.0}pixelYDimension=200, {http://www.alfresco.org/model/content/1.0}author=null}
2020-12-04 16:26:00,997 DEBUG [org.alfresco.repo.content.metadata.AbstractMappingMetadataExtracter] [http-nio-8080-exec-7] Completed metadata extraction: reader: ContentAccessor[ contentUrl=store://2020/12/4/16/26/1618fdc1-bf70-48c6-827d-3e6226a16686.bin, mimetype=image/png, size=5421, encoding=UTF-8, locale=en_US] extracter: org.alfresco.repo.content.metadata.TikaAutoMetadataExtracter@2f60e43 changed: {{http://www.alfresco.org/model/exif/1.0}pixelXDimension=200, {http://www.alfresco.org/model/content/1.0}title=null, {http://www.alfresco.org/model/exif/1.0}pixelYDimension=200, {http://www.alfresco.org/model/content/1.0}author=null}

Let me know if you need any additional details.

Creating renditions for previous versions broke the restore operation

Steps to reproduce:
In alfresco share:

  1. Upload image 1.
  2. Upload new version (image 2) in alfresco share.

In rest api(http://ip:8080/api-explorer/
3) Create rendition for not latest version
curl:
curl -X POST "http://ip:8080/alfresco/api/-default-/public/alfresco/versions/1/nodes/5dd77fae-e30f-4009-a45d-0b91a4788bbd/versions/1.0/renditions" -H "accept: application/json" -H "Content-Type: application/json" -d "{ \"id\": \"imgpreview\"}"
url: http://dt0007.ce.local:8080/alfresco/api/-default-/public/alfresco/versions/1/nodes/5dd77fae-e30f-4009-a45d-0b91a4788bbd/versions/1.0/renditions

In alfresco share or in rest api:
4) Try to restore version 1.
4.1) In ui(alfresco share):
Message "Cannot restore image 1";
Status 500
log in console
"07180471 Wrapped Exception (with status template): 071853490 Failed to execute script 'classpath*:alfresco/templates/webscripts/org/alfresco/repository/version/revert.post.json.js': nodeRef is a mandatory parameter"
4.2) In rest api:
Status 400.
url:
http://ip:8080/alfresco/api/-default-/public/alfresco/versions/1/nodes/5dd77fae-e30f-4009-a45d-0b91a4788bbd/versions/1.0/revert
log:
{ "error": { "errorKey": "framework.exception.ApiDefault", "statusCode": 400, "briefSummary": "nodeRef is a mandatory parameter", "stackTrace": "For security reasons the stack trace is no longer displayed, but the property is kept for previous versions" "descriptionURL": "https://api-explorer.alfresco.com" } }

We were expecting the problem to be fixed here but we were told the wrong repository:
Alfresco/acs-deployment#988

We use docker compose:
alfresco/alfresco-content-repository-community:7.0.0
alfresco/alfresco-share:7.0.0
transform-core-aio:alfresco/alfresco-transform-core-aio:2.3.10

I also install the latest version in the middle of August locally via docker compose. Here the
problem also reproduces.
https://docs.alfresco.com/content-services/community/install/containers/docker-compose/
image: docker.io/alfresco-content-repository-community:7.4.0.1
image: docker.io/alfresco/alfresco-share:7.4.0.1
image: alfresco/alfresco-transform-core-aio:4.0.0

I would appreciate it if someone could fix this problem or suggest a way around this bug.

Wrong syntax in DB patch index drops for Mysql/Mariadb

The patch that creates some indexes for transaction tables is wrong for Mysql/Mariadb:

In Mariadb/Mysql the drop statement should reference to the table, something like:

DROP INDEX idx_alf_node_ver ON alf_node;

This happens for all the drops in the file. Those drops seem to be optional and they don't fail but of course they don't do their work either so in my case, while upgrading from Community 6.0 to Community 7.1 this caused a duplicate index error for "idx_alf_txn_ctms".

Modifying categories via smart folder not over REST API not working

Using the REST API it is not possible to modify the categories of a node when referred to with a smart folder node ref. This problem is apparent when using Digital Workspace UI (ACA) that depends on the API calls.

This behavior of the API can be observed since the introduction at Alfresco 7.4.

Step to replicate:
Download a new SDK and enable smart folders in the global properties.
Build and start the SDK.
Use Share interface to create a new folder and make it a smart folder.
Find a document's smart folder reference.
Make the API call:

curl -X POST "http://localhost:8080/alfresco/api/-default-/public/alfresco/versions/1/nodes/ { the smart noderef} /category-links" -H "accept: application/json" -H "authorization: Basic YWRtaW46YWRtaW4=" -H "Content-Type: application/json" -d "{ "categoryId": "79c8cf75-a4a2-48b4-b2da-67e4dbf51d15"}"

Observe the result:

{
"error": {
"errorKey": "Current user does not have change permission to content",
"statusCode": 403,
"briefSummary": "01020004 Current user does not have change permission to content",
"stackTrace": "For security reasons the stack trace is no longer displayed, but the property is kept for previous versions",
"descriptionURL": "https://api-explorer.alfresco.com"
}
}

Repeated error filling logs on calling the node rest api for user authenticating with correct username, but incorrect match case.

Verified on Alfresco Community 7.4 and 23

The logs of some clients were filled with this error on the rest api calls in the specific case , the service was not going to fail , just filled the logs with this annoying error.

2024-03-12T12:48:55,984 [] ERROR [util.transaction.TransactionSupportUtil] [http-nio-8080-exec-7] After completion (committed) exception
org.alfresco.repo.security.authentication.AuthenticationException: 02126217 User name does not exist: pi*******
        at org.alfresco.repo.security.authentication.RepositoryAuthenticationDao.updateUser(RepositoryAuthenticationDao.java:456) ~[alfresco-repository-20.164.jar:20.164]
        at org.alfresco.repo.security.authentication.HashPasswordTransactionListener$1.execute(HashPasswordTransactionListener.java:106) ~[alfresco-repository-20.164.jar:20.164]
        at org.alfresco.repo.security.authentication.HashPasswordTransactionListener$1.execute(HashPasswordTransactionListener.java:1) ~[alfresco-repository-20.164.jar:20.164]
        at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:452) ~[alfresco-repository-20.164.jar:20.164]
        at org.alfresco.repo.security.authentication.HashPasswordTransactionListener.afterCommit(HashPasswordTransactionListener.java:91) ~[alfresco-repository-20.164.jar:20.164]
        at org.alfresco.util.transaction.TransactionSupportUtil$TransactionSynchronizationImpl.afterCompletion(TransactionSupportUtil.java:598) ~[alfresco-core-20.164.jar:20.164]
        at org.springframework.transaction.support.TransactionSynchronizationUtils.invokeAfterCompletion(TransactionSynchronizationUtils.java:172) ~[spring-tx-5.3.27.jar:5.3.27]
        at org.springframework.transaction.support.AbstractPlatformTransactionManager.invokeAfterCompletion(AbstractPlatformTransactionManager.java:977) ~[spring-tx-5.3.27.jar:5.3.27]
        at org.springframework.transaction.support.AbstractPlatformTransactionManager.triggerAfterCompletion(AbstractPlatformTransactionManager.java:952) ~[spring-tx-5.3.27.jar:5.3.27]
        at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:785) ~[spring-tx-5.3.27.jar:5.3.27]
        at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:711) ~[spring-tx-5.3.27.jar:5.3.27]
        at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:654) ~[spring-tx-5.3.27.jar:5.3.27]
        at org.alfresco.util.transaction.SpringAwareUserTransaction.commit(SpringAwareUserTransaction.java:507) ~[alfresco-core-20.164.jar:20.164]
        at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:474) ~[alfresco-repository-20.164.jar:20.164]
        at org.alfresco.repo.web.scripts.RepositoryContainer.executeScriptInternal(RepositoryContainer.java:406) ~[alfresco-remote-api-20.164.jar:20.164]
        at org.alfresco.repo.web.scripts.RepositoryContainer.executeScript(RepositoryContainer.java:309) ~[alfresco-remote-api-20.164.jar:20.164]
        at org.alfresco.rest.api.PublicApiRepositoryContainer.access$001(PublicApiRepositoryContainer.java:47) ~[alfresco-remote-api-20.164.jar:20.164]
        at org.alfresco.rest.api.PublicApiRepositoryContainer$1.doWork(PublicApiRepositoryContainer.java:84) ~[alfresco-remote-api-20.164.jar:20.164]
        at org.alfresco.repo.tenant.TenantUtil.runAsWork(TenantUtil.java:126) ~[alfresco-data-model-20.164.jar:20.164]
        at org.alfresco.repo.tenant.TenantUtil.runAsTenant(TenantUtil.java:95) ~[alfresco-data-model-20.164.jar:20.164]
        at org.alfresco.rest.api.PublicApiRepositoryContainer.executeScript(PublicApiRepositoryContainer.java:80) ~[alfresco-remote-api-20.164.jar:20.164]
        at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:423) ~[spring-webscripts-8.40.jar:8.40]
        at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:210) ~[spring-webscripts-8.40.jar:8.40]
        at org.alfresco.repo.web.scripts.TenantWebScriptServlet.service(TenantWebScriptServlet.java:82) ~[alfresco-remote-api-20.164.jar:20.164]
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:596) ~[servlet-api.jar:4.0.FR]
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:209) ~[catalina.jar:9.0.73]
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153) ~[catalina.jar:9.0.73]
        at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) ~[tomcat-websocket.jar:9.0.73]
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178) ~[catalina.jar:9.0.73]
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153) ~[catalina.jar:9.0.73]
        at org.alfresco.module.aosmodule.service.ContextRootFilter.doFilter(ContextRootFilter.java:93) ~[alfresco-aos-repo-binding-1.6.0.jar:?]
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178) ~[catalina.jar:9.0.73]
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153) ~[catalina.jar:9.0.73]
        at org.springframework.extensions.webscripts.servlet.SecurityHeadersFilter.doFilter(SecurityHeadersFilter.java:177) ~[spring-webscripts-8.40.jar:8.40]
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178) ~[catalina.jar:9.0.73]
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153) ~[catalina.jar:9.0.73]
        at org.alfresco.repo.web.filter.beans.NullFilter.doFilter(NullFilter.java:75) ~[alfresco-remote-api-20.164.jar:20.164]
        at jdk.internal.reflect.GeneratedMethodAccessor1069.invoke(Unknown Source) ~[?:?]
        at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
        at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?]
        at org.alfresco.repo.management.subsystems.ChainingSubsystemProxyFactory$1.invoke(ChainingSubsystemProxyFactory.java:132) ~[alfresco-repository-20.164.jar:20.164]
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.3.27.jar:5.3.27]
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:220) ~[spring-aop-5.3.27.jar:5.3.27]
        at jdk.proxy4.$Proxy372.doFilter(Unknown Source) ~[?:?]
        at org.alfresco.repo.web.filter.beans.BeanProxyFilter.doFilter(BeanProxyFilter.java:89) ~[alfresco-remote-api-20.164.jar:20.164]
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178) ~[catalina.jar:9.0.73]
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153) ~[catalina.jar:9.0.73]
        at org.alfresco.web.app.servlet.GlobalLocalizationFilter.doFilter(GlobalLocalizationFilter.java:68) ~[alfresco-remote-api-20.164.jar:20.164]
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178) ~[catalina.jar:9.0.73]
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153) ~[catalina.jar:9.0.73]
        at org.alfresco.web.app.servlet.ClearSecurityContextFilter.doFilter(ClearSecurityContextFilter.java:53) ~[alfresco-remote-api-20.164.jar:20.164]
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178) ~[catalina.jar:9.0.73]
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153) ~[catalina.jar:9.0.73]
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:167) ~[catalina.jar:9.0.73]
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:90) ~[catalina.jar:9.0.73]
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:492) ~[catalina.jar:9.0.73]
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:130) ~[catalina.jar:9.0.73]
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:93) ~[catalina.jar:9.0.73]
        at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:768) ~[catalina.jar:9.0.73]
        at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:673) ~[catalina.jar:9.0.73]
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74) ~[catalina.jar:9.0.73]
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) ~[catalina.jar:9.0.73]
        at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:389) ~[tomcat-coyote.jar:9.0.73]
        at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63) ~[tomcat-coyote.jar:9.0.73]
        at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:926) ~[tomcat-coyote.jar:9.0.73]
        at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1791) ~[tomcat-coyote.jar:9.0.73]
        at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) ~[tomcat-coyote.jar:9.0.73]
        at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191) ~[tomcat-util.jar:9.0.73]
        at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659) ~[tomcat-util.jar:9.0.73]
        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) ~[tomcat-util.jar:9.0.73]
        at java.lang.Thread.run(Thread.java:833) ~[?:?]

In the specific case to give an example the "List Node Children" call .

The problem we verified stems from the fact that some usernames were created as "PIPPO" while calls to the rest api were made with "pippo," having set the property

user.name.caseSensitive=false

the service prints the error, but then moves on, but by now the error has been printed, if I make the call with "PIPPO" instead of "pippo" on the rest api the error is not printed.

here the problematic line :

It should be caseUnSensitiveSearchUserName if user.name.caseSensitive=false no ?

Is it possible also for this portion of the code to add ul case unsensitve check of the property ?

[Bug with Fix] Integrity violations - invalid property value found on "cm:name" during upload of folder with empty space

In recent months I am frequently encountering the error I highlighted in this post:
https://hub.alfresco.com/t5/alfresco-content-services-forum/integrity-violations-invalid-property-value-found-on-quot-cm/m-p/315150

Thanks to menczingerm I found out what the problem is:

This is the constrait for cm:name property from the contentModel.xml

<constraints>
   <constraint name="cm:filename" type="REGEX">
      <parameter name="expression"><value><![CDATA[(.*[\"\*\\\>\<\?\/\:\|]+.*)|(.*[\.]?.*[\.]+$)|(.*[ ]+$)]]></value></parameter>
      <parameter name="requiresMatch"><value>false</value></parameter>
   </constraint>
   <constraint name="cm:userNameConstraint" type="org.alfresco.repo.dictionary.constraint.UserNameConstraint" />
   <constraint name="cm:authorityNameConstraint" type="org.alfresco.repo.dictionary.constraint.AuthorityNameConstraint" />
   <constraint name="cm:storeSelectorConstraint" type="REGISTERED">
      <parameter name="registeredName"><value>defaultStoreSelector</value></parameter>
   </constraint>
</constraints>

Tested via RestApi and CMIS browserbind calls and as expected Alfresco will trim the space from the end of the filename, when you try to upload a folder in Share UI then it do not trim the spaces at the end of the folder name so you will receive this error.

Constraint: 002013695 Value '2020 ACCERT. RES. MINORI X ACQUISIZ. CITT. ITA ' is not valid as a file name. This property must be a valid file name.

The space is the problem at the end of the filename, i am forced to preprocess the file/folder name values before the upload.

This issue is solved with this PR: #1988

Group permissions lost then moving node to another Site

If you attempt to move a node from one site to another, all defined group permissions are lost. This occurs because Alfresco wants to clear Site Groups from the old site, but in doing so, it inadvertently removes all group permissions:

if (authority.startsWith(PermissionService.GROUP_PREFIX) &&

This issue can be resolved by modifying the code to:

if (authority.startsWith(PermissionService.GROUP_PREFIX + "site_") &&

This adjustment ensures that only "site groups" are removed, preserving explicitly defined ones.

Thanks to MorganP at the Alfresco Discord for pointing me to the right direction.

Root object person.getPerson seems to not work properly

Hello everybody!

I'm writing to get some help or some idea about why something is happening in my Alfresco Content Service environment. I have built some extensions over my instance using Javascript based Webscripts. All of them work perfectly, however I do have one exception. The problem is: in one webscript I invoke the Javascript root object person.getPerson in this way:

 var userNodes = people.getPeople(null,0);

And it doesn't return anything, however, I do have some users registered in my instance. Also, I can see all of them using the node browser and the following Alfresco-CMIS query:

 SELECT * FROM cm:person

I tried to test the same webscript in a test instance and it worked without problems. So, I don't think the code is the problem. In addition, I have read the implementation of the root object. And I discover that, "under the hoods", the code creates the following FTS query and passes it to the SearchService:
TYPE:"{http://www.alfresco.org/model/content/1.0}person" AND ("***")

I tried to verify this query in the node browser too and it didn't return anything too. I also tried to remove the "AND ("***")" snippet from the query and then it worked without any problems.
Do someone knows what could be and why the query without "AND ("***")" works properly?

Some informations about my environment:
Alfresco's version: 6.2
Edition: Community

Thanks in advance!
Felipe

CMIS permission problem with multifiled document

Installation type:

Problem tested and reproduced on both images:

  • alfresco-content-repository-community:6.1.2-ga
  • alfresco-content-repository-community:6.2.0-ga

Originally posted on: https://hub.alfresco.com/t5/alfresco-content-services-forum/cmis-permission-problem-with-multifiled-document/m-p/303213#M22078

I have been working with multifiling through CMIS and weird permission (ACL) issue keeps appearing.

Exact steps to reproduce problem would be these:

  1. User1 creates Document1 in personal home folder which is only accessible to him/her (/User Homes/User1)
  2. User1 shares Document1 with User2 (give ACE permission "all" to User2) and also through admin account perform action "Add Object to Folder" which multifiles Document1 inside User2's home folder(/User Homes/User2) as well
  3. Document1 appears visible in User2's home folder and all is well. Allowable actions for User2 contains entries like "CAN_DELETE_OBJECT" and "CAN_UPDATE_PROPERTIES". However, when attempting to update properties through CMIS with User2, i get "Permission denied: 10130296 Access Denied. You do not have the appropriate permissions to perform this operation."

I have to note that all of these actions work fine through Alfresco Share, modifying properties, moving the document and others. However, through CMIS all of them raise previously mentioned exception.

Peek 2020-12-09 12-42

Please tell me if any additional details are required. Thanks!

External Authorisation for Endpoints

Hello

I am using JWT for purpose authenticating to alfresco repo. Although users don't exist in alfresco database, I have enabled global properties
create.missing.people=true
for creating users.

The issue now is authorisation for endpoints. My authorisation database is external to alfresco repo. Alfresco Repo does not have facility to protect endpoints using externalise authorisation (based on my browsing through DOCS). Is this possible?

Search API with exact term operator behaves differently when unrecognized sort body parameters are included

Suppose I have two folders, test and another test, and I make a search query (to /alfresco/api/-default-/public/search/versions/1/search) with params:

{
	"query": {
		"query": "=\"test\" AND +TYPE:\"cm:folder\""
	}
}

I get both entries in the response.

If I specify that test must be the folder name:

{
	"query": {
		"query": "=cm:name:\"test\" AND +TYPE:\"cm:folder\""
	}
}

then I get only one (the first folder, with name exactly tesลง). Not sure if this is intentional, the documentation I found is not clear.

However, including the sort parameters changes the results:

{
	"query": {
		"query": "=cm:name:\"test\" AND +TYPE:\"cm:folder\""
	},
	"sort": [{
		"type": "FIELD",
		"field": "name" // or "type"
	}]
}

still 1 entry

{
	"query": {
		"query": "=cm:name:\"test\" AND +TYPE:\"cm:folder\""
	},
	"sort": [{
		"type": "FIELD",
		"field": "cm:content.mimetype" // or "asdfg"
	}]
}

2 entries.

I'm not sure which result is supposedly the correct one, but using an unrecognized field on the sort should definitely not influence the matching logic.

Using alfresco community v7.0.0

Download as Zip has wrong download filename.

Hello,

There is a bug with the Download as Zip feature in Alfresco Share. The file download name is no longer "Archive.zip". The name currently consists of a UUID without an file extension.
The error is only about the share UI and not with the content app

affected versions: 7.3, 7.4

Alfresco Office Services AOS use hardcoded authentication url for oAuth2/openid, incompatibility with other providers

Filing this here, as there is no other public tracker for AOS

The class org.alfresco.module.aosmodule.auth.service.AosAuthenticationUriService use a hardcoded AuthServer url when enabling oAuth2.

This is not compatible with all authentication providers. Better would be if it used the url returned by ``.well-known/openid-configuration`, this should return the correct url, and is what the repository uses. At leas make the url configurable.

Code from decompiled class that is hardcoded.

public String getIdpLoginURI(IdentityServiceConfig identityServiceConfig) {

  PropertyCheck.mandatory(this, "identityServiceConfig", identityServiceConfig);

  return identityServiceConfig.getAuthServerUrl() + "/protocol/openid-connect/auth" + "?client_id=" + identityServiceConfig.getResource() + "&redirect_uri=" + this.getAuthenticateResponseURI() + "&response_type=code" + "&scope=openid";

}

Default Crypto Algorithm in Alfresco

Hi.

From the following source code, it appears that when using Alfresco, it is assumed that keys generated with the "TripleDES (DESede)" encryption method will be used.

throw new AlfrescoRuntimeException("Unable to generate secret key: key algorithm is not DESede and no keyData provided");

However, from the comments in the Alfresco SSL Generator source code, it appears that the standard method (Current) used in ACS 7 uses the AES encryption method.

https://github.com/Alfresco/alfresco-ssl-generator/blob/2d749d0f224a870893be22769ba684d2908a5ccc/ssl-tool/run.sh#L114

Will it be modified to assume the use of keys generated by the AES encryption method?

Dependabot couldn't authenticate with https://artifacts.alfresco.com/nexus/content/groups/internal

Dependabot couldn't authenticate with https://artifacts.alfresco.com/nexus/content/groups/internal.

Dependabot tried to authenticate with the details you previously provided, but authentication failed. If they are no longer valid you will need to provide Dependabot with new credentials.

You can provide authentication details in your Dependabot dashboard by clicking into the account menu (in the top right) and selecting 'Config variables'.

View the update logs.

WebDav file uploads not working

WebDav file uploads are not working when the default error.jsp is used. In order to upload a file, webDav checks if the file is already there (with a PROPFIND request) and returns a 404 if not. Due to the statement in error.jsp this 404 gets redirected to a /webdav/ (as a GET requst). This then returns a 200 response code which prevents the file upload. When I remove this if statement in the error.jsp, the upload works as expected.

if (request.getMethod().equalsIgnoreCase("PROPFIND") || request.getMethod().equalsIgnoreCase("OPTIONS"))

I'm not sure why this redirect is there? I think it can just be removed.

Steps to reproduce:

  • Create a new Alfresco SDK project with the maven archetype
  • Start Alfresco with run.sh build_start
  • Mount a folder and try to upload a document
  • Or execute a PROPFIND request to a non existing document: curl --insecure --anyauth --user 'admin:admin' --include --request PROPFIND 'http://localhost:8080/alfresco/webdav/Shared/test.xml'

Enhance get node content REST API

Enhance get node content REST API (/nodes/{nodeId}/content) to return content if node has property that has type content.
Currently REST API return error if type is not match ContentModel.TYPE_CONTENT and not consider if
node has property of type Content.

Dependabot couldn't authenticate with https://artifacts.alfresco.com/nexus/content/groups/internal

Dependabot couldn't authenticate with https://artifacts.alfresco.com/nexus/content/groups/internal.

Dependabot tried to authenticate with the details you previously provided, but authentication failed. If they are no longer valid you will need to provide Dependabot with new credentials.

You can provide authentication details in your Dependabot dashboard by clicking into the account menu (in the top right) and selecting 'Config variables'.

View the update logs.

ERROR - No bean named 'baseContentTransformer' available

When trying to start Alfresco in version 7.0, the following error occurs:

`
2021-04-26 11:39:06,707 ERROR [web.context.ContextLoader] [main] Context initialization failed

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'patch.updateAdminUserWhenDefault' defined in URL [jar:file:/usr/local/tomcat/webapps/alfresco/WEB-INF/lib/alfresco-repository-8.423.jar!/alfresco/patch/patch-services-context.xml]: Invocation of init method failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean definition with name 'transformer.onlyoffice' defined in URL [jar:file:/usr/local/tomcat/webapps/alfresco/WEB-INF/lib/onlyoffice-integration-repo.jar!/alfresco/extension/onlyoffice-context.xml]: Could not resolve parent bean definition 'baseContentTransformer'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'baseContentTransformer' available

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1788)


at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:609)


at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:531)


at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)


at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)


at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)


at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)


at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:944)


at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:923)


at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:588)


at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:401)


at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:292)


at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:103)


at org.alfresco.web.app.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:70)


at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4716)


at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5177)


at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)


at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:717)


at org.apache.catalina.core.ContainerBase.access$000(ContainerBase.java:129)


at org.apache.catalina.core.ContainerBase$PrivilegedAddChild.run(ContainerBase.java:150)


at org.apache.catalina.core.ContainerBase$PrivilegedAddChild.run(ContainerBase.java:140)


at java.base/java.security.AccessController.doPrivileged(Native Method)


at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:688)


at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:706)


at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1133)


at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1866)


at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)


at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)


at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)


at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:118)


at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:1045)


at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:429)


at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1576)


at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:309)


at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)


at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:423)


at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:366)


at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:936)


at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:843)


at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)


at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1384)


at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1374)


at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)


at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)


at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140)


at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:909)


at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)


at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)


at org.apache.catalina.core.StandardService.startInternal(StandardService.java:434)


at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)


at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:930)


at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)


at org.apache.catalina.startup.Catalina.start(Catalina.java:772)


at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)


at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)


at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)


at java.base/java.lang.reflect.Method.invoke(Method.java:566)


at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:342)


at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:473)

Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean definition with name 'transformer.onlyoffice' defined in URL [jar:file:/usr/local/tomcat/webapps/alfresco/WEB-INF/lib/onlyoffice-integration-repo.jar!/alfresco/extension/onlyoffice-context.xml]: Could not resolve parent bean definition 'baseContentTransformer'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'baseContentTransformer' available

at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedBeanDefinition(AbstractBeanFactory.java:1417)


at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedBeanDefinition(AbstractBeanFactory.java:1358)


at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1344)


at org.springframework.beans.factory.support.DefaultListableBeanFactory.doGetBeanNamesForType(DefaultListableBeanFactory.java:565)


at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:550)


at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:527)


at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:520)


at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveNamedBean(DefaultListableBeanFactory.java:1219)


at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveBean(DefaultListableBeanFactory.java:494)


at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveBean(DefaultListableBeanFactory.java:500)


at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBean(DefaultListableBeanFactory.java:349)


at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBean(DefaultListableBeanFactory.java:342)


at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1177)


at org.alfresco.repo.admin.patch.impl.AdminUserPatch.afterPropertiesSet(AdminUserPatch.java:117)


at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.lambda$invokeInitMethods$5(AbstractAutowireCapableBeanFactory.java:1838)


at java.base/java.security.AccessController.doPrivileged(Native Method)


at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1837)


at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1784)

๏ฟฝ
... 58 more

Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'baseContentTransformer' available

at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:863)


at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1344)


at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedBeanDefinition(AbstractBeanFactory.java:1132)


at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedBeanDefinition(AbstractBeanFactory.java:1401)

๏ฟฝ
... 75 more

26-Apr-2021 11:39:06.716 SEVERE [main] org.apache.catalina.core.StandardContext.startInternal One or more listeners failed to start. Full details will be found in the appropriate container log file

26-Apr-2021 11:39:06.721 SEVERE [main] org.apache.catalina.core.StandardContext.startInternal Context [/alfresco] startup failed due to previous errors`

Database: Content node distinction

Hey there.

I am aware that this is a feature request rather than a bug, but since the discussion area is disabled, I would nonetheless like to try my luck here.

It is currently not possible to filter on specific content node types (like wiki-page, discussion-post, etc.) via the database. Since I rely on SQL this issue is very important to me.

I simply don't understand why no additional properties are used to distinguish wiki pages, dashboard.xml files, discussion posts and the many other content nodes.

It would be easy to set properties after uploading a file, creating a page in the forum or creating a wiki page. This would also make it easy to use the database.

I also explained my request here and since then I'm trying (unsuccessfully) to create an appropriate query that includes the parent nodes and namespaces.

Given the otherwise intuitive and well-designed structure of the database, I am puzzled as to why such distinctions have been omitted.

Regards

Getting fileplans runs into caching issue due to security interceptor

When RM is enabled and there is a basic RM site, this caching issue occurs, which can lead to unnecessary DB calls.
Every time FilePlanServiceImpl Set<NodeRef> getFilePlans(final StoreRef storeRef) gets called, it is intercepted, and the resulting set gets cleared, when the user does not have read permissions.
The issue occurs when the cached value is returned, because it does not return a copy of the set in the cache, but the set itself. So the GLOBAL shared set inside the cache gets emptied every time it's returned from cache.

Faceted Search Results Footer Renders HTML as Text

On the faceted search results page, the footer html is being rendered as text. This results in the logo being misplaced and all the links not working and being displayed as raw text - such as

Supplied free of charge with <alfresco.com/services/support/communityterms/#support> no support,

Versions affected: Community 6.2, 7.0

Screenshot 2021-06-01 at 16 12 30

Screenshot 2021-06-01 at 16 14 20

Downloaded files have '+' (plus) character instead of ' ' (space)

Description

Filename is not preserved after downlaoding when it contains a whitespace character.

Steps to reproduce

  1. Upload "a b.c" file
  2. Download "a b.c" file
  3. Downloaded file name is "a+b.c"

Affected version

Alfresco Community 7.2

Faulty commit

I guess @kcichonczyk created this bug in the 870
Now it uses java.net.URLEncoder, previosly it used org.springframework.extensions.surf.util.URLEncoder where in the docs are implicily said that "The space character ' ' is converted into "%20" - NOT a plus sign!"

Link to Alfresco issue tracker in CONTRIBUTING.md points to old Jira

Title says it all, I'm immediately greeted with:

Jira has been migrated to Atlassian Cloud and is available at https://alfresco.atlassian.net/

This instance is in read-only mode for archive purposes

No further instructions there.

EDIT: My Atlassian account apparently "doesn't have access to Jira on alfresco.atlassian.net."

AOS not available after bulkimport

I used the bulkimport tool purposed by Alfresco to import my files with (for each) xml properties file.

Unfortunatly, when i try to edit my file with AOS the button is not availaible, neither in the Alfresco Content App.

However, the AOS services are available with documents that i dragged and dropped.

Has anyone ever been faced with this problem?

Strange folders inside generated zip when archiving and zip in Alfresco Share

Hi:

Description:

In Alfresco Community 7.2, when generating a zip file in Alfresco Share in a path that contains content rules, the generated zip file contains strange folders with the noderef of the content rules applied .

It seems that, it would be necessary to filter and exclude these system content nodes in the repo webscript.

Affected versions:

  • Alfresco Community 7.2

Steps to reproduce:

  • Create a Test folder
  • Upload some documents
  • Create a simple content rule in Test folder
  • Use archive and compress action in Test folder

The generated zip file, when uncompressed, contains an empty folder with the uuid of the content rule node.

Regards.
--C.

Class CacheRegionKey is doubled

When debugging caching issues, I stumbled upon TransactionalCache line 419. There, CacheRegionKeys are filtered out and their underlying key values should be returned. When executing the method I still got keys of a class "CacheRegionKey".

It turns out, there are 2 classes CacheRegionKey: One as a sub class of TranasactionalCache and one is a standalone class. The sub class is older being introduced with 4.0 while the standalone class was introduced in 4.2.

Both classes have the same serialVersionUID = -213050301938804468L and the same attributes in the same order, so I suspect this is an errror. The sub class has two additional get-methods, so it looks like there was a merge-conflict, where one branch moved the class into a new file and another branch added these methods and during merge it was decided to keep both classes, instead of moving the new methods to the moved class.

Dependabot couldn't authenticate with https://artifacts.alfresco.com/nexus/content/groups/internal

Dependabot couldn't authenticate with https://artifacts.alfresco.com/nexus/content/groups/internal.

Dependabot tried to authenticate with the details you previously provided, but authentication failed. If they are no longer valid you will need to provide Dependabot with new credentials.

You can provide authentication details in your Dependabot dashboard by clicking into the account menu (in the top right) and selecting 'Config variables'.

View the update logs.

How do you open an issue on their issue tracker ?

https://hub.alfresco.com/t5/alfresco-content-services-hub/reporting-an-issue/ba-p/289727:

Alfresco maintains a public issue tracker at
http://issues.alfresco.com/
Anyone can sign up for an account.
...
Though Alfresco's open source code is generally hosted on GitHub, the projects that make up Alfresco Content Services do not use GitHub for tracking issues. By directing all issues into the ALF project of the Alfresco issue tracker, we receive the following benefits:

    It is easier for reporters to know where to report an issue.
    We have a consistent process.
    We can accept contributions in a variety of formats.
    We can ensure the acceptance of the [Alfresco Contribution Agreement](https://hub.alfresco.com/docs/DOC-7070)โ€Œ for all contributions to our project.

Can anyone explain how you can create an account and report issues ? Anyone can sign up for an account., well I might be too dumb, cause I can't. If I try to create an account, it doesn't have the rights to create an issue or even MP a dev. The community forum is also quite dead.

PermissionEventGenerator on enterprise repo events

Dear All,
the org.alfresco.enterprise.repo.event2.PermissionEventGenerator produces permission generations event errors for deleted nodes (for example nodes deleted by repository behaviour logics).

In the public void afterCommit() method we reckon that you have to correct your code for example in this way:

for (Map.Entry<NodeRef, EnterpriseEventConsolidator> entry : consolidators.getPermissionChanges().entrySet())
{
if (!nodeService.exists(entry.getKey())) { //ADDED CODE
LOGGER.warn("Node " + entry.getKey() + " doesn't exist -- skipping event permission generation");
continue;
}
EnterpriseEventConsolidator eventConsolidator = entry.getValue();
sendEvent(entry.getKey(), eventConsolidator);
sendChildrenEvents(entry.getKey());
}

Regards.

A PlainText preview is garbled when it includes non-ASCII characters encoded with not UTF-8(e.g. Shift_JIS)

Hi experts,
We have a problem that ACS preview functionality provides garbled results when a plain text document has non-ASCII characters encoded with not UTF-8. We have ACS community edition 7.3.1, 7.4 and 23.1 and this happens in all versions.
Even if the same characters are included in a plain text encoded with UTF-8, transformed result in preview window is correct (not garbled)

Of coursse, if this document is not a plain text but a MS-Word or so, such garbled result will not be provided.
In my understanding, the transformer is libreoffice in case of transforming from plain text to pdf for preview window. But I confirmed libreoffice on server could open this plain text file with non-ASCII characters(Japanese) encoded with Shift_JIS properly...

Much appreciated if you give us supportive information to resolve this... Or clarify whether this is a bug or not.

#Garbled preview result in case of Shift_JIS encoding plain text
shift_jis_preview_result

#Correct preview result in case of UTF-8 encoding plain text
utf-8_preview_result

parameter location missing in search yaml

I used the yaml definitions of the api endpoint to generate the necessary Model Classes. However when the endpoint gets triggered the following error gets thrown

com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "location" (class 
com.alfresco.rest.client.search.model.ResultNode), not marked as ignorable (22 known properties: "isLink", "parentId", "isFile", 
"versionComment", "search", "createdByUser", "name", "allowableOperations", "aspectNames", "properties", "isLocked", "archivedAt", 
"isFolder", "content", "id", "nodeType", "path", "modifiedByUser", "createdAt", "modifiedAt", "archivedByUser", "versionLabel"])

meaning the result from the endpoint doesn't match the definition as it looks something like this (optained from the api-explorer):

  {
  "list": {
    "pagination": {
      "count": 1,
      "hasMoreItems": false,
      "totalItems": 1,
      "skipCount": 0,
      "maxItems": 100
    },
    "context": {
      "consistency": {
        "lastTxId": 51
      }
    },
    "entries": [
      {
        "entry": {
          "createdAt": "2022-10-19T11:02:22.343+0000",
          "isFolder": true,
          "search": {
            "score": 1
          },
          "isFile": false,
          "createdByUser": {
            "id": "admin",
            "displayName": "Administrator"
          },
          "modifiedAt": "2022-10-19T11:19:05.384+0000",
          "modifiedByUser": {
            "id": "admin",
            "displayName": "Administrator"
          },
          "name": "TestNode",
  ====>   "location": "nodes",
          "id": "dc437fc4-14dc-3912-8cf2-05ddd18e6869",
          "nodeType": "nodes:test",
          "parentId": "65b49f46-962c-18b8-34ea-893cf460bd8e"
        }
      }
    ]
  }
}

instead of this
alfrescoSearchModel

Alfresco 7.1 Does not extract text from PDF/A of large files

(I'm not sure exactly which repo I ask this in).

I've been trying to get Alfresco to extract texts from PDF/A files larger than 25 MB and I haven't been successful. I've read countless pages of documentation, installed different versions on different operating systems. I tested several recommended settings, removed all the limits I could find. All of this without success.

At the moment I'm using:

  • Alfresco version 7.1
  • Search Services 2.0.2
  • Ubuntu 20.04 (compatible version according to documentation).
  • Installation was done through Ansible. Following all the documentation.

Alfresco can extract text from PDF files smaller than 25MB, but none larger than that. The logs do not return any problems regarding this.

I know this from the logs, here 2 PDFs of different sizes were sent. But only one extracted the text:
pdf-test

Goal: Be able to search for terms that exist in PDF/A files larger than 25MB.

Some settings I've tried:

### Time out configured for all extractor and all mimetypes
content.metadataExtracter.default.timeoutMs=3600000

### Maximum size of a document to process - configured for PdfBoxMetadataExtracter , pdf files
content.metadataExtracter.pdf.maxDocumentSizeMB=900

### Maximum number of concurrent extractions - configured for PdfBoxMetadataExtracter , pdf files
content.metadataExtracter.pdf.maxConcurrentExtractionsCount=15


content.transformer.default.timeoutMs=3600000
content.transformer.default.txt.*.maxSourceSizeKBytes=1073741824
content.transformer.JodConverter.maxSourceSizeKBytes=1073741824
content.transformer.JodConverter.extensions.doc.pdf.maxSourceSizeKBytes=1073741824
content.transformer.JodConverter.extensions.doc.pdf.maxSourceSizeKBytes.use.asyncRule=1073741824
content.transformer.default.extensions.pdf.swf.maxSourceSizeKBytes.use.index=1073741824
content.transformer.TikaAuto.timeoutMs.use.index=3600000
content.transformer.default.extensions.doc.txt.maxSourceSizeKBytes=1073741824
content.transformer.TikaAuto.timeoutMs=3600000
content.transformer.default.extensions.pdf.swf.maxSourceSizeKBytes=1073741824
content.transformer.default.extensions.pdf.swf.maxSourceSizeKBytes.use.webpreview=1073741824
content.transformer.PdfBox.extensions.pdf.txt.maxSourceSizeKBytes=1073741824
content.transformer.TikaAuto.extensions.pdf.txt.maxSourceSizeKBytes=1073741824

I followed the instructions on this page:
export TRANSFORMER_ROUTES_ADDITIONAL_custom="/etc/opt/alfresco/content-services/classpath/alfresco/extension/transform/pipelines/custom-pipeline-file.json"

And I created the file custom-pipeline-file.json with the most varied configurations, here are some that I tried:

{
  "overrideSupported": [
    {
      "maxSourceSizeBytes": 1073741824
    }
  ]
}
{
  "transformers": [
    {
      "transformerName": "tika",
      "supportedSourceAndTargetList": [
        {"sourceMediaType": "application/pdf", "maxSourceSizeBytes": 1073741824, "targetMediaType": "text/plain" },
        {"sourceMediaType": "application/pdf", "priority": 40, "targetMediaType": "text/plain" }
      ]
    }
  ]
}

After digging deeper into this I got a configuration in the file I created custom-pipeline-file.json which gave a different result. Here's the configuration:

{
     "transformers": [
        {
            "transformerName": "PdfBox",
            "supportedSourceAndTargetList": [
                 {"sourceMediaType": "application/pdf", "maxSourceSizeBytes": 1073741824, "targetMediaType": "text/plain"}
            ],
            "transformOptions": [
                "pdfboxOptions"
            ]
        }]
}

And I get the error below in the logs:

2022-10-25 02:44:40.172 ERROR 41834 --- [nio-8090-exec-7] o.a.transformer.TransformController      : No transforms were able to handle the request

org.alfresco.transform.exceptions.TransformException: No transforms were able to handle the request
    at org.alfresco.transformer.AbstractTransformerController.getTransformerName(AbstractTransformerController.java:444) ~[alfresco-transformer-base-2.5.3.jar!/:2.5.3]
    at org.alfresco.transformer.AbstractTransformerController.getTransformerName(AbstractTransformerController.java:421) ~[alfresco-transformer-base-2.5.3.jar!/:2.5.3]
    at org.alfresco.transformer.AbstractTransformerController.transform(AbstractTransformerController.java:172) ~[alfresco-transformer-base-2.5.3.jar!/:2.5.3]
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:na]
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
    at java.base/java.lang.reflect.Method.invoke(Method.java:566) ~[na:na]
    at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:197) ~[spring-web-5.3.9.jar!/:5.3.9]
    at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:141) ~[spring-web-5.3.9.jar!/:5.3.9]
    at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:106) ~[spring-webmvc-5.3.9.jar!/:5.3.9]
    at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895) ~[spring-webmvc-5.3.9.jar!/:5.3.9]
    at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808) ~[spring-webmvc-5.3.9.jar!/:5.3.9]
    at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87) ~[spring-webmvc-5.3.9.jar!/:5.3.9]
    at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1064) ~[spring-webmvc-5.3.9.jar!/:5.3.9]
    at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:963) ~[spring-webmvc-5.3.9.jar!/:5.3.9]
    at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006) ~[spring-webmvc-5.3.9.jar!/:5.3.9]
    at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909) ~[spring-webmvc-5.3.9.jar!/:5.3.9]
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:681) ~[tomcat-embed-core-9.0.52.jar!/:na]
    at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883) ~[spring-webmvc-5.3.9.jar!/:5.3.9]
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:764) ~[tomcat-embed-core-9.0.52.jar!/:na]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227) ~[tomcat-embed-core-9.0.52.jar!/:na]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) ~[tomcat-embed-core-9.0.52.jar!/:na]
    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) ~[tomcat-embed-websocket-9.0.52.jar!/:na]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) ~[tomcat-embed-core-9.0.52.jar!/:na]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) ~[tomcat-embed-core-9.0.52.jar!/:na]
    at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100) ~[spring-web-5.3.9.jar!/:5.3.9]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.3.9.jar!/:5.3.9]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) ~[tomcat-embed-core-9.0.52.jar!/:na]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) ~[tomcat-embed-core-9.0.52.jar!/:na]
    at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93) ~[spring-web-5.3.9.jar!/:5.3.9]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.3.9.jar!/:5.3.9]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) ~[tomcat-embed-core-9.0.52.jar!/:na]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) ~[tomcat-embed-core-9.0.52.jar!/:na]
    at org.springframework.boot.actuate.metrics.web.servlet.WebMvcMetricsFilter.doFilterInternal(WebMvcMetricsFilter.java:96) ~[spring-boot-actuator-2.5.4.jar!/:2.5.4]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.3.9.jar!/:5.3.9]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) ~[tomcat-embed-core-9.0.52.jar!/:na]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) ~[tomcat-embed-core-9.0.52.jar!/:na]
    at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201) ~[spring-web-5.3.9.jar!/:5.3.9]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.3.9.jar!/:5.3.9]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) ~[tomcat-embed-core-9.0.52.jar!/:na]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) ~[tomcat-embed-core-9.0.52.jar!/:na]
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197) ~[tomcat-embed-core-9.0.52.jar!/:na]
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97) ~[tomcat-embed-core-9.0.52.jar!/:na]
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:542) ~[tomcat-embed-core-9.0.52.jar!/:na]
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135) ~[tomcat-embed-core-9.0.52.jar!/:na]
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) ~[tomcat-embed-core-9.0.52.jar!/:na]
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78) ~[tomcat-embed-core-9.0.52.jar!/:na]
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:357) ~[tomcat-embed-core-9.0.52.jar!/:na]
    at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:382) ~[tomcat-embed-core-9.0.52.jar!/:na]
    at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65) ~[tomcat-embed-core-9.0.52.jar!/:na]
    at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:893) ~[tomcat-embed-core-9.0.52.jar!/:na]
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1726) ~[tomcat-embed-core-9.0.52.jar!/:na]
    at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) ~[tomcat-embed-core-9.0.52.jar!/:na]
    at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191) ~[tomcat-embed-core-9.0.52.jar!/:na]
    at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659) ~[tomcat-embed-core-9.0.52.jar!/:na]
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) ~[tomcat-embed-core-9.0.52.jar!/:na]
    at java.base/java.lang.Thread.run(Thread.java:829) ~[na:na]

I know this is probably a configuration issue rather than a bug, but I've had a lot of trouble getting this to work with just the documentation provided.

CSRF-Filter should support null in Origin Header

when using node browser of the admin console, latest Firefox is sending Origin: null which then throws:

javax.servlet.ServletException: Possible CSRF attack noted when asserting origin header 'null'. Request: POST /alfresco/s/admin/admin-nodebrowser

So the only option may be to disable the CSRF-Filter at all on repo side or to fake/replace the null value in nginx/reverse proxy

Origin header should support null by spec. s.

RM Query select_NodeIdsWhichReferenceContentUrl performance issue

The query select_NodeIdsWhichReferenceContentUrl defined in RM file config\alfresco\module\org_alfresco_module_rm\query\rm-common-SqlMap.xml takes very long to execute on a production database (the amount of data in the database needs to be significantly large to reproduce the issue). It can take anywhere between 20 and 45 minutes. Which makes sense to me, seeing that one of the joins is done on a column which is not an index (alf_node_properties.long_value).

The result is that the "destroy" action on each record takes really long to complete.

A lot of zombie processes created

Why there is a zombie process in the system when docker-compose raise the containers?, It show something related with [soffice.bin] module.
alfresco7:~/alfresco$ ps aux | egrep 'Z|defunct'
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
33017 32691 0.0 0.0 0 0 ? Z 07:52 0:00 [soffice.bin]
If the system is alive for several days, these zombie processes will increases a lot. (I believe it depends of the use of alfresco)
any ideas?

image

Allow File Name Overrides on Direct Access URL Requests

When retrieving a content URL for nodes, renditions, or versions, a file name body parameter should be allowed so files can be downloaded with a user supplied name.

This would allow easier integration with external metadata databases, setups where the source of the file name isn't consistent, or situations where the file name is often changed, requiring frequent API calls.

I plan on throwing together some code for this and linking to this issue, but most of the repo's supporting links are dead so let me know if I should proceed differently.

Add support for configurable oAuth2 scopes

The oAuth2 scopes that Alfresco request from the authentication server needs to be configurable.
Currently hardcoded:
https://github.com/Alfresco/alfresco-community-repo/blob/master/repository/src/main/java/org/alfresco/repo/security/authentication/identityservice/IdentityServiceFacadeFactoryBean.java#L384

Explanation
Trying to implement oAuth2 with Authentik, https://goauthentik.io I got an error saying "ERROR [site.servlet.AIMSFilter] [http-nio-8080-exec-2] Resulted in Error while doing refresh token refreshToken cannot be null"
Tracked it down to that you have to grant the "offline_access" scope for Authentik to send it
goauthentik/authentik#8660
I assume this also means the client (Alfresco has to request it), bit that is currently not possible.

Side note: I think using Authentik can be a good reference implementation to test that Alfresco has good support for oAuth2, and not just with keycloak.

"Tags" i18n

The tagRootCategory.xml file has hard-coded "Tags" cm:name which is why users see "Tags" label while adding tags.

Quick fix:
In the tagRootCategory.xml:
<cm:name>${bootstrap.categories.cm_taggable.name}</cm:name>

And in the bootstrap-messages.properties :
bootstrap.categories.cm_taggable.name=Tags

kerberos sso brakes ticket auth on REST-API

In a kerberos enabled Alfresco (tested in CE 6.1, 7.1) login ticket based authentication (either by header or url parameter) works if sso is disabled and no longer works on the REST-API endpoint (/alfresco/api/) if sso is enabled. The webscript enpoint (/alfresco/service/) still works as expected appending url parameter alf_ticket:

Once sso is enabled ticket authentication fails on REST-API and I don't see any code in the stacktrace trying to login by ticket. Instead I only see attempts to use the ticket as username.

kerberos.authentication.sso.enabled=true
kerberos.authentication.browser.ticketLogons=true

Full stacktrace (username is heiko, Ticket starts with TI*:
catalina.out.txt

testcase is enable kerberos sso and access REST-API with ticket as described in the docs: Using the ticket

Secret header is set twice in the request from Solr to Alresco repository (X-Alfresco-Search-Secret)

Hi,

I've installed Alfresco 7.2 with ansible (installer v2.0)
Communications between Alfresco and Solr were configured to use "secret"
Everything was working fine but then I added an apache proxy between Solr and Alfresco : solr started to throw 403 errors

After some investigations, I've discovered that the X-Alfresco-Search-Secret header is set twice in the request from solr to Alfresco.
This is not an issue on its own as it's allowed by http protocole but that should be corrected

In Apache proxy (and in other proxies too I believe), when a header is set twice, they are concatened in the response (or in the forwarded request to the backend).

So basically :

X-Alfresco-Search-Secret:MWSd8bhEtfgYidx_Jn6t
X-Alfresco-Search-Secret:MWSd8bhEtfgYidx_Jn6t

become :

X-Alfresco-Search-Secret:MWSd8bhEtfgYidx_Jn6t, MWSd8bhEtfgYidx_Jn6t

And then Alfresco is unable to interpret it correctly (I believe is taking the entire value as the secret)

Inconsistent cm:modifier depending on the rendition is supported or not

I noticed when a code is run with the System security context, the cm:modifier property will be changed to "System" when the thumbnail is generated, or will change to the currently authenticated user when the thumbnail is not generated.

Sample code:

try {
	AuthenticationUtil.setRunAsUserSystem();
	FileUtils.copySourceContent(sourceRef, destRef, contentService); // sample method which copies PROP_CONTENT from sourceRef to destRef using ContentReader and ContentWriter
} finally {
	AuthenticationUtil.clearCurrentSecurityContext();
}

Example No 1. File sample.pdf (pdf is supported by the renditionService) after executing this code as the test user will have cm:modifier set to "System"
Example No 2. File test.dwg (dwg is not supported by the renditionService ) after execution this code as the test user will have cm:modifier set to "test"

When debugging I can see my code is executed as the "test" ( getFullyAuthenticatedUser() ) with the "System" security content ( getRunAsUser() ) BUT the code creating a thumbnail ( processEvent() in the RenditionEventProcessor.java, onContentUpdate(), requestAsyncTransformOrRendition() in the RenditionService2Impl.java, consume(), consumeRendition(),setThumbnailLastModified()) is executed as the "System".

I suppose there is a bug in the 135 line of RenditionEventProcessor.java where we should get the authenticatedUser instead of the executingUser.

The commit introducing this issue: 65a35ba by @cristianturlica
In the RenditionEventProcessor::processEvent() the Context is null so we have to read authenticatedUser and executingUser from the event. Currently only executingUser is read and authenticatedUser is missed

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.