mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Fixed AR-1321: Allow '&' in filename
The following filename is valid now: "x ¬ £ % & + ; x.txt" This was a restriction imposed by WebDAV, but the encoding of the repsonses is working well and these restrictions be removed as a result. Fixed AR-1281: WebDAV upload was assigning incorrect encoding I added a bean 'charset.finder', which can be fetched from the MimetypeService. Various pluggins now exist to decode a stream and figure out what the encoding is. WebDAV and CIFS/FTP are now hooked into this so that they guess a little better. Fixed others: Added retrying transactions to WebDAV. Read/write transactions for WebDAV. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@6073 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -94,9 +94,12 @@
|
||||
</bean>
|
||||
|
||||
<bean id="mimetypeService" class="org.alfresco.repo.content.MimetypeMap" init-method="init" >
|
||||
<constructor-arg>
|
||||
<property name="configService">
|
||||
<ref bean="mimetypeConfigService" />
|
||||
</constructor-arg>
|
||||
</property>
|
||||
<property name="contentCharsetFinder">
|
||||
<ref bean="charset.finder"/>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="contentFilterLanguagesConfigService" class="org.alfresco.config.xml.XMLConfigService" init-method="init">
|
||||
|
@@ -143,6 +143,21 @@
|
||||
<value>false</value>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<!-- Characterset decoder -->
|
||||
<bean id="charset.finder" class="org.alfresco.repo.content.encoding.ContentCharsetFinder">
|
||||
<property name="defaultCharset">
|
||||
<value>UTF-8</value>
|
||||
</property>
|
||||
<property name="mimetypeService">
|
||||
<ref bean="mimetypeService"/>
|
||||
</property>
|
||||
<property name="charactersetFinders">
|
||||
<list>
|
||||
<bean class="org.alfresco.encoding.GuessEncodingCharsetFinder" />
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<!-- transaction service -->
|
||||
<alias name="transactionService" alias="transactionComponent"/>
|
||||
|
@@ -2,7 +2,7 @@
|
||||
|
||||
<config evaluator="string-compare" condition="Mimetype Map">
|
||||
<mimetypes>
|
||||
<mimetype mimetype="text/plain" display="Plain Text">
|
||||
<mimetype mimetype="text/plain" text="true" display="Plain Text">
|
||||
<extension display="Plain Text" default="true">txt</extension>
|
||||
<extension display="Comma Separated Values">csv</extension>
|
||||
<extension display="Java Source">java</extension>
|
||||
@@ -15,14 +15,14 @@
|
||||
<extension display="Unix Shell Script">sh</extension>
|
||||
<extension display="Log">log</extension>
|
||||
</mimetype>
|
||||
<mimetype mimetype="text/html" display="HTML">
|
||||
<mimetype mimetype="text/html" text="true" display="HTML">
|
||||
<!-- first extension will be default unless otherwise specified -->
|
||||
<extension default="true">html</extension>
|
||||
<extension>htm</extension>
|
||||
<extension>shtml</extension>
|
||||
<extension>body</extension>
|
||||
</mimetype>
|
||||
<mimetype mimetype="application/xhtml+xml" display="XHTML">
|
||||
<mimetype mimetype="application/xhtml+xml" text="true" display="XHTML">
|
||||
<extension default="true">xhtml</extension>
|
||||
</mimetype>
|
||||
<mimetype mimetype="application/postscript" display="Postscript">
|
||||
@@ -77,7 +77,7 @@
|
||||
<mimetype mimetype="image/cgm" display="CGM Image">
|
||||
<extension>cgm</extension>
|
||||
</mimetype>
|
||||
<mimetype mimetype="application/java" display="Java Class">
|
||||
<mimetype mimetype="application/java" text="true" display="Java Class">
|
||||
<extension>class</extension>
|
||||
</mimetype>
|
||||
<mimetype mimetype="application/x-cpio" display="">
|
||||
@@ -86,7 +86,7 @@
|
||||
<mimetype mimetype="application/x-csh" display="">
|
||||
<extension>csh</extension>
|
||||
</mimetype>
|
||||
<mimetype mimetype="text/css" display="Style Sheet">
|
||||
<mimetype mimetype="text/css" text="true" display="Style Sheet">
|
||||
<extension>css</extension>
|
||||
</mimetype>
|
||||
<mimetype mimetype="application/msword" display="Microsoft Word">
|
||||
@@ -95,7 +95,7 @@
|
||||
<mimetype mimetype="application/wordperfect" display="WordPerfect">
|
||||
<extension>wpd</extension>
|
||||
</mimetype>
|
||||
<mimetype mimetype="text/xml" display="XML">
|
||||
<mimetype mimetype="text/xml" text="true" display="XML">
|
||||
<extension default="true">xml</extension>
|
||||
<extension display="DTD">dtd</extension>
|
||||
<extension display="XSLT">xslt</extension>
|
||||
@@ -104,7 +104,7 @@
|
||||
<mimetype mimetype="application/x-dvi" display="">
|
||||
<extension>dvi</extension>
|
||||
</mimetype>
|
||||
<mimetype mimetype="text/x-setext" display="">
|
||||
<mimetype mimetype="text/x-setext" text="true" display="">
|
||||
<extension>etx</extension>
|
||||
</mimetype>
|
||||
<mimetype mimetype="image/gif" display="GIF Image">
|
||||
@@ -125,7 +125,7 @@
|
||||
<mimetype mimetype="application/mac-binhex40" display="">
|
||||
<extension>hqx</extension>
|
||||
</mimetype>
|
||||
<mimetype mimetype="text/calendar" display="iCalendar File">
|
||||
<mimetype mimetype="text/calendar" text="true" display="iCalendar File">
|
||||
<extension>ics</extension>
|
||||
</mimetype>
|
||||
<mimetype mimetype="image/ief" display="IEF Image">
|
||||
@@ -142,10 +142,10 @@
|
||||
<mimetype mimetype="image/svg" display="Scalable Vector Graphics Image">
|
||||
<extension>svg</extension>
|
||||
</mimetype>
|
||||
<mimetype mimetype="application/x-javascript" display="Java Script">
|
||||
<mimetype mimetype="application/x-javascript" text="true" display="Java Script">
|
||||
<extension>js</extension>
|
||||
</mimetype>
|
||||
<mimetype mimetype="application/x-latex" display="Latex">
|
||||
<mimetype mimetype="application/x-latex" text="true" display="Latex">
|
||||
<extension>latex</extension>
|
||||
</mimetype>
|
||||
<mimetype mimetype="application/x-troff-man" display="Man Page">
|
||||
@@ -229,10 +229,10 @@
|
||||
<extension>sgml</extension>
|
||||
<extension>sgm</extension>
|
||||
</mimetype>
|
||||
<mimetype mimetype="application/x-sh" display="Shell Script">
|
||||
<mimetype mimetype="application/x-sh" text="true" display="Shell Script">
|
||||
<extension>sh</extension>
|
||||
</mimetype>
|
||||
<mimetype mimetype="application/x-shar" display="">
|
||||
<mimetype mimetype="application/x-shar" text="true" display="">
|
||||
<extension>shar</extension>
|
||||
</mimetype>
|
||||
<mimetype mimetype="application/x-wais-source" display="">
|
||||
@@ -264,7 +264,7 @@
|
||||
<extension>tiff</extension>
|
||||
<extension>tif</extension>
|
||||
</mimetype>
|
||||
<mimetype mimetype="text/tab-separated-values" display="Tab Separated Values">
|
||||
<mimetype mimetype="text/tab-separated-values" text="true" display="Tab Separated Values">
|
||||
<extension>tsv</extension>
|
||||
</mimetype>
|
||||
<mimetype mimetype="application/x-ustar" display="">
|
||||
|
@@ -16,7 +16,7 @@
|
||||
|
||||
<constraints>
|
||||
<constraint name="cm:filename" type="REGEX">
|
||||
<parameter name="expression"><value><![CDATA[(.*[\"\*\\\>\<\?\/\:\|\xA3\xAC\%\&\+\;]+.*)|(.*[\.]?.*[\.]+$)|(.*[ ]+$)]]></value></parameter>
|
||||
<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" />
|
||||
|
@@ -58,6 +58,7 @@
|
||||
<property name="searchService"><ref bean="SearchService" /></property>
|
||||
<property name="namespaceService"><ref bean="namespaceService" /></property>
|
||||
<property name="contentService"><ref bean="ContentService" /></property>
|
||||
<property name="mimetypeService"><ref bean="MimetypeService" /></property>
|
||||
<property name="permissionService"><ref bean="permissionService"/></property>
|
||||
<property name="authenticationComponent"><ref bean="authenticationComponent"/></property>
|
||||
<property name="authenticationService"><ref bean="authenticationService"/></property>
|
||||
|
Reference in New Issue
Block a user