File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -143,6 +143,12 @@ class LDP {
143143 if ( slug . match ( / \/ | \| | : / ) ) {
144144 throw error ( 400 , 'The name of new file POSTed may not contain : | or /' )
145145 }
146+ // not to break pod ACL must have text/turtle contentType
147+ if ( slug . endsWith ( this . suffixAcl ) || extension === this . suffixAcl ) {
148+ if ( contentType !== this . aclContentType ) {
149+ throw error ( 415 , 'POST contentType for ACL must be text/turtle' )
150+ }
151+ }
146152 }
147153 // Containers should not receive an extension
148154 if ( container ) {
@@ -214,6 +220,11 @@ class LDP {
214220 'PUT request require a valid content type via the Content-Type header' )
215221 }
216222
223+ // not to break pod : url ACL must have text/turtle contentType
224+ if ( ( url . url || url ) . endsWith ( this . suffixAcl ) && contentType !== this . aclContentType ) {
225+ throw error ( 415 , 'PUT contentType for ACL must be text-turtle' )
226+ }
227+
217228 // First check if we are above quota
218229 let isOverQuota
219230 try {
You can’t perform that action at this time.
0 commit comments