Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chunking V1 broken #195

Closed
michaelstingl opened this issue Apr 8, 2020 · 2 comments
Closed

Chunking V1 broken #195

michaelstingl opened this issue Apr 8, 2020 · 2 comments

Comments

@michaelstingl
Copy link
Contributor

michaelstingl commented Apr 8, 2020

Tested with:

Prerequisite

Force desktop client to use chunking V1:

OWNCLOUD_CHUNKING_NG=0 \
/Applications/owncloud.app/Contents/MacOS/owncloud \
--logfile -

Chunking V1 with oCIS 💥

Request 1:

PUT https://ocis-latest.owncloud.com/remote.php/webdav/big_buck_bunny_480p_h264.mov-00.00.00.000-00.00.27.586.mov-chunking-1991365000-2-0
Host:             ocis-latest.owncloud.com                                                                                                                         
Content-Type:     application/octet-stream                                                                                                                         
OC-Chunk-Size:    10000000                                                                                                                                         
OC-Chunked:       1                                                                                                                                                
OC-Total-Length:  13260932                                                                                                                                         
X-OC-Mtime:       1498226861                                                                                                                                       
Authorization:    Bearer eyJhbGciOiJQUzI1NiIsImtpZCI6IiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJ4ZFhPdDEzSkt4eW0xQjFRY0VuY2YyWERrTEFleE1CRndpVDlqNkVmaGhIRkpoczJLTTlqYmpUbWY4S
                  kJYRTY5IiwiZXhwIjoxNTg2MzgzMDI5LCJqdGkiOiItajFReElhdHhLR3dzRVBoRnVHNGxIQnBocTdyanFaaCIsImlhdCI6MTU4NjM4MjQyOSwiaXNzIjoiaHR0cHM6Ly9vY2lzLWxhdGVzdC
                  5vd25jbG91ZC5jb20iLCJzdWIiOiJYdFNpX21peVdTQi1wa3ZHbnhQb0M1QTRmbGloMFVDTGd2VTdjTHdqbWpDS1g3RlluMkhXazZyUkNFdXkyRzVxQXlfeU1RY19GSzlhTkZoVU1yWDJwUUB
                  rb25uZWN0Iiwia2MuaXNBY2Nlc3NUb2tlbiI6dHJ1ZSwia2MuYXV0aG9yaXplZFNjb3BlcyI6WyJvcGVuaWQiLCJvZmZsaW5lX2FjY2VzcyIsImVtYWlsIiwicHJvZmlsZSJdLCJrYy5pZGVu
                  dGl0eSI6eyJrYy5pLmRuIjoiRWluc3RlaW4iLCJrYy5pLmlkIjoiY249ZWluc3RlaW4sb3U9dXNlcnMsZGM9ZXhhbXBsZSxkYz1vcmciLCJrYy5pLnVuIjoiZWluc3RlaW4ifSwia2MucHJvd
                  mlkZXIiOiJpZGVudGlmaWVyLWxkYXAifQ.JM4BRIiFKIwY4NRDo9LHobItV4aTVnguEYrFtSWQnOdZZ74_g2RXRskCAmgy0O2QVSeUpoLtLFFs4pf54Xsj6lEmPQg2wfXiqaX1p5rPHO0L9z4
                  nde6Jcs8MmpTWvVYJFgCyQzkk9IKvlWkUqEEOPotzQkYVByvQ6E9zYk6wRIfB11QJAlPV8KLEVYyE6L7VV-k5ndnBkCWDr2hWQCozD8ffmeNMWUJLAX_iOozreW7IL08qQ7lSTncO2GdAHP1H
                  Ivz6Zgyfz1Z8QItPSFIWPZAYaXom30QMr6SiUMVSEc3vZF3rX72ctMndNJJAhrhkUe9w72ZZIUuU99R5d3CovQ                                                           
User-Agent:       Mozilla/5.0 (Macintosh) mirall/2.7.0daily20200408 (ownCloud, osx-19.3.0 ClientArchitecture: x86_64 OsArchitecture: x86_64)                       
Accept:           */*                                                                                                                                              
X-Request-ID:     1efc49b4-28e3-45aa-b24e-00416eccb031                                                                                                             
Content-Length:   10000000                                                                                                                                         
Connection:       Keep-Alive                                                                                                                                       
Accept-Encoding:  gzip, deflate                                                                                                                                    
Accept-Language:  en-DE,* 

Response 1:

206 Partial Content
Access-Control-Allow-Origin:  *                                                                                                                                    
Content-Length:               0                                                                                                                                    
Date:                         Wed, 08 Apr 2020 21:47:34 GMT                                                                                                        
Referrer-Policy:              strict-origin-when-cross-origin                                                                                                      
Strict-Transport-Security:    max-age=315360000; preload                                                                                                           
Vary:                         Origin                                                                                                                               
X-Access-Token:               eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJyZXZhIiwiZXhwIjoxNTg2Mzg2MDUwLCJpYXQiOjE1ODYzODI0NTAsImlzcyI6Imh0dHBzOi8vb2Npcy1sYXRl
                              c3Qub3duY2xvdWQuY29tIiwidXNlciI6eyJpZCI6eyJpZHAiOiJodHRwczovL29jaXMtbGF0ZXN0Lm93bmNsb3VkLmNvbSIsIm9wYXF1ZV9pZCI6ImVpbnN0ZWluIn0sInVzZ
                              XJuYW1lIjoiZWluc3RlaW4iLCJtYWlsIjoiZWluc3RlaW5AZXhhbXBsZS5vcmciLCJkaXNwbGF5X25hbWUiOiJFaW5zdGVpbiJ9fQ.UQMWj8CGvzPz7rwSvo4ENOSYky0Vacg
                              HGh75sb_X1iQ                                                                                                                         
X-Content-Type-Options:       nosniff                                                                                                                              
X-Frame-Options:              SAMEORIGIN                                                                                                                           
X-Xss-Protection:             1; mode=block 

Request 2:

PUT https://ocis-latest.owncloud.com/remote.php/webdav/big_buck_bunny_480p_h264.mov-00.00.00.000-00.00.27.586.mov-chunking-1991365000-2-1
Host:             ocis-latest.owncloud.com                                                                                                                         
Content-Type:     application/octet-stream                                                                                                                         
OC-Checksum:      SHA256:d5ecba048bbdf13714542c8f4ba81f44b1ab38347c50f4137282d5020e628b64                                                                          
OC-Chunk-Size:    10000000                                                                                                                                         
OC-Chunked:       1                                                                                                                                                
OC-Total-Length:  13260932                                                                                                                                         
X-OC-Mtime:       1498226861                                                                                                                                       
Authorization:    Bearer eyJhbGciOiJQUzI1NiIsImtpZCI6IiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJ4ZFhPdDEzSkt4eW0xQjFRY0VuY2YyWERrTEFleE1CRndpVDlqNkVmaGhIRkpoczJLTTlqYmpUbWY4S
                  kJYRTY5IiwiZXhwIjoxNTg2MzgzMDI5LCJqdGkiOiItajFReElhdHhLR3dzRVBoRnVHNGxIQnBocTdyanFaaCIsImlhdCI6MTU4NjM4MjQyOSwiaXNzIjoiaHR0cHM6Ly9vY2lzLWxhdGVzdC
                  5vd25jbG91ZC5jb20iLCJzdWIiOiJYdFNpX21peVdTQi1wa3ZHbnhQb0M1QTRmbGloMFVDTGd2VTdjTHdqbWpDS1g3RlluMkhXazZyUkNFdXkyRzVxQXlfeU1RY19GSzlhTkZoVU1yWDJwUUB
                  rb25uZWN0Iiwia2MuaXNBY2Nlc3NUb2tlbiI6dHJ1ZSwia2MuYXV0aG9yaXplZFNjb3BlcyI6WyJvcGVuaWQiLCJvZmZsaW5lX2FjY2VzcyIsImVtYWlsIiwicHJvZmlsZSJdLCJrYy5pZGVu
                  dGl0eSI6eyJrYy5pLmRuIjoiRWluc3RlaW4iLCJrYy5pLmlkIjoiY249ZWluc3RlaW4sb3U9dXNlcnMsZGM9ZXhhbXBsZSxkYz1vcmciLCJrYy5pLnVuIjoiZWluc3RlaW4ifSwia2MucHJvd
                  mlkZXIiOiJpZGVudGlmaWVyLWxkYXAifQ.JM4BRIiFKIwY4NRDo9LHobItV4aTVnguEYrFtSWQnOdZZ74_g2RXRskCAmgy0O2QVSeUpoLtLFFs4pf54Xsj6lEmPQg2wfXiqaX1p5rPHO0L9z4
                  nde6Jcs8MmpTWvVYJFgCyQzkk9IKvlWkUqEEOPotzQkYVByvQ6E9zYk6wRIfB11QJAlPV8KLEVYyE6L7VV-k5ndnBkCWDr2hWQCozD8ffmeNMWUJLAX_iOozreW7IL08qQ7lSTncO2GdAHP1H
                  Ivz6Zgyfz1Z8QItPSFIWPZAYaXom30QMr6SiUMVSEc3vZF3rX72ctMndNJJAhrhkUe9w72ZZIUuU99R5d3CovQ                                                           
User-Agent:       Mozilla/5.0 (Macintosh) mirall/2.7.0daily20200408 (ownCloud, osx-19.3.0 ClientArchitecture: x86_64 OsArchitecture: x86_64)                       
Accept:           */*                                                                                                                                              
X-Request-ID:     51c9eacb-6230-4a80-af24-2a6fde3f4933                                                                                                             
Content-Length:   3260932                                                                                                                                          
Connection:       Keep-Alive                                                                                                                                       
Accept-Encoding:  gzip, deflate                                                                                                                                    
Accept-Language:  en-DE,* 

Response 2:

500 Internal Server Error
Access-Control-Allow-Origin:  *                                                                                                                                    
Content-Length:               0                                                                                                                                    
Date:                         Wed, 08 Apr 2020 21:47:35 GMT                                                                                                        
Referrer-Policy:              strict-origin-when-cross-origin                                                                                                      
Strict-Transport-Security:    max-age=315360000; preload                                                                                                           
Vary:                         Origin                                                                                                                               
X-Access-Token:               eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJyZXZhIiwiZXhwIjoxNTg2Mzg2MDU0LCJpYXQiOjE1ODYzODI0NTQsImlzcyI6Imh0dHBzOi8vb2Npcy1sYXRl
                              c3Qub3duY2xvdWQuY29tIiwidXNlciI6eyJpZCI6eyJpZHAiOiJodHRwczovL29jaXMtbGF0ZXN0Lm93bmNsb3VkLmNvbSIsIm9wYXF1ZV9pZCI6ImVpbnN0ZWluIn0sInVzZ
                              XJuYW1lIjoiZWluc3RlaW4iLCJtYWlsIjoiZWluc3RlaW5AZXhhbXBsZS5vcmciLCJkaXNwbGF5X25hbWUiOiJFaW5zdGVpbiJ9fQ.bTL2-jKSxF2BTivmpXGH7lK2i_WXn33
                              T2Y1ZXsD_dC4                                                                                                                         
X-Content-Type-Options:       nosniff                                                                                                                              
X-Frame-Options:              SAMEORIGIN                                                                                                                           
X-Xss-Protection:             1; mode=block 

Chunking V1 with oC 10.4.1

Request 1:

PUT https://shniq.cloud/remote.php/webdav/big_buck_bunny_480p_h264.mov-00.00.00.000-00.00.27.586%202.mov-chunking-243284347-2-0
Host:             shniq.cloud                                                                                                                                      
Content-Type:     application/octet-stream                                                                                                                         
OC-Chunk-Size:    10000000                                                                                                                                         
OC-Chunked:       1                                                                                                                                                
OC-Total-Length:  13260932                                                                                                                                         
X-OC-Mtime:       1498226861                                                                                                                                       
Authorization:    Bearer uog3zGFeJiLznMmQjoEQ7NUfbQEkWTTLNdgyU8Lo4VHIkyOpCeXTOIAvzxRiTaWF                                                                          
User-Agent:       Mozilla/5.0 (Macintosh) mirall/2.7.0daily20200408 (ownCloud, osx-19.3.0 ClientArchitecture: x86_64 OsArchitecture: x86_64)                       
Accept:           */*                                                                                                                                              
X-Request-ID:     053fc89f-2416-40bc-8d3f-213618746858                                                                                                             
Cookie:           __cfduid=dd5eb3c6fa71f955a99d24bffad288bc81586386130; ocg2xa8aahfp=6g1g1e4n29du2i5i0qhb7djvrv; oc_sessionPassphrase=jFD5heTQ9K01pZrC4EraNTQWoBa3o
                  4HrgNCeMPwYWDSraneh5V8v4ebBRE8uTBPqUg%2BD%2FGUvtCk%2BVrYMI1Z4cSsTjAU1L98RXjG0HzDqTIUHzZ367UGnUOyPpIu%2FPIF%2B                                    
Content-Length:   10000000                                                                                                                                         
Connection:       Keep-Alive                                                                                                                                       
Accept-Encoding:  gzip, deflate                                                                                                                                    
Accept-Language:  en-DE,*  

Response 1:

201 Created
Date:                           Wed, 08 Apr 2020 22:49:52 GMT                                                                                                      
Content-Type:                   text/html; charset=UTF-8                                                                                                           
Transfer-Encoding:              chunked                                                                                                                            
Connection:                     keep-alive                                                                                                                         
X-Content-Type-Options:         nosniff                                                                                                                            
X-XSS-Protection:               1; mode=block                                                                                                                      
X-Robots-Tag:                   none                                                                                                                               
X-Frame-Options:                SAMEORIGIN                                                                                                                         
X-Download-Options:             noopen                                                                                                                             
X-Permitted-Cross-Domain-Polic  none                                                                                                                               
ies:                                                                                                                                                               
Expires:                        Thu, 19 Nov 1981 08:52:00 GMT                                                                                                      
Cache-Control:                  no-store, no-cache, must-revalidate                                                                                                
Pragma:                         no-cache                                                                                                                           
Content-Security-Policy:        default-src 'none';                                                                                                                
CF-Cache-Status:                DYNAMIC                                                                                                                            
Expect-CT:                      max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"                                            
Strict-Transport-Security:      max-age=15552000; includeSubDomains; preload                                                                                       
Server:                         cloudflare                                                                                                                         
CF-RAY:                         580f8b3418309cd6-AMS   

Request 2:

PUT https://shniq.cloud/remote.php/webdav/big_buck_bunny_480p_h264.mov-00.00.00.000-00.00.27.586%202.mov-chunking-243284347-2-1
Host:             shniq.cloud                                                                                                                                      
Content-Type:     application/octet-stream                                                                                                                         
OC-Checksum:      SHA1:1b66d6bf59637184fd19c747e91ce7442ce87af2                                                                                                    
OC-Chunk-Size:    10000000                                                                                                                                         
OC-Chunked:       1                                                                                                                                                
OC-Total-Length:  13260932                                                                                                                                         
X-OC-Mtime:       1498226861                                                                                                                                       
Authorization:    Bearer uog3zGFeJiLznMmQjoEQ7NUfbQEkWTTLNdgyU8Lo4VHIkyOpCeXTOIAvzxRiTaWF                                                                          
User-Agent:       Mozilla/5.0 (Macintosh) mirall/2.7.0daily20200408 (ownCloud, osx-19.3.0 ClientArchitecture: x86_64 OsArchitecture: x86_64)                       
Accept:           */*                                                                                                                                              
X-Request-ID:     6d0da6ca-cf67-4c67-83b7-cc7735df93f6                                                                                                             
Cookie:           __cfduid=dd5eb3c6fa71f955a99d24bffad288bc81586386130; ocg2xa8aahfp=6g1g1e4n29du2i5i0qhb7djvrv; oc_sessionPassphrase=jFD5heTQ9K01pZrC4EraNTQWoBa3o
                  4HrgNCeMPwYWDSraneh5V8v4ebBRE8uTBPqUg%2BD%2FGUvtCk%2BVrYMI1Z4cSsTjAU1L98RXjG0HzDqTIUHzZ367UGnUOyPpIu%2FPIF%2B                                    
Content-Length:   3260932                                                                                                                                          
Connection:       Keep-Alive                                                                                                                                       
Accept-Encoding:  gzip, deflate                                                                                                                                    
Accept-Language:  en-DE,* 

Response 2:

201 Created
Date:                           Wed, 08 Apr 2020 22:49:53 GMT                                                                                                      
Content-Type:                   text/html; charset=UTF-8                                                                                                           
Transfer-Encoding:              chunked                                                                                                                            
Connection:                     keep-alive                                                                                                                         
X-Content-Type-Options:         nosniff                                                                                                                            
X-XSS-Protection:               1; mode=block                                                                                                                      
X-Robots-Tag:                   none                                                                                                                               
X-Frame-Options:                SAMEORIGIN                                                                                                                         
X-Download-Options:             noopen                                                                                                                             
X-Permitted-Cross-Domain-Polic  none                                                                                                                               
ies:                                                                                                                                                               
Expires:                        Thu, 19 Nov 1981 08:52:00 GMT                                                                                                      
Cache-Control:                  no-store, no-cache, must-revalidate                                                                                                
Pragma:                         no-cache                                                                                                                           
Content-Security-Policy:        default-src 'none';                                                                                                                
X-OC-MTime:                     accepted                                                                                                                           
OC-ETag:                        9c22abc7ee32e80bc6a00caf35f4aad7                                                                                                   
CF-Cache-Status:                DYNAMIC                                                                                                                            
Expect-CT:                      max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"                                            
Strict-Transport-Security:      max-age=15552000; includeSubDomains; preload                                                                                       
Server:                         cloudflare                                                                                                                         
CF-RAY:                         580f8b47d82c9cd6-AMS     
@michaelstingl
Copy link
Contributor Author

Here you can find more information about chunking V1:
https://github.com/cernbox/smashbox/blob/master/protocol/protocol.md#chunked-file-upload

@michaelstingl
Copy link
Contributor Author

Chunking V1 still broken, but client 2.7 won't try chunking V1 with the latest oCIS capabilities. Close for now…

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant