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

Fix checksum check when uploading to external storage #27689

Merged
merged 1 commit into from Apr 20, 2017

Conversation

PVince81
Copy link
Contributor

Description

Don't exclude files outside of "/files" when dealing with non-home storages.

Related Issue

Fixes #27686

Motivation and Context

How Has This Been Tested?

Integration test

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@davitol

@davitol
Copy link
Contributor

davitol commented Apr 19, 2017

👍 Tested and Fixes #27686

but accesing to the mountpoint via webUI the following log appears (related to the file uploaded via Desktop Client)

{"reqId":"aMDC24oq6bmBB3fz0CWW","level":3,"time":"2017-04-19T16:18:26+00:00","remoteAddr":"82.159.139.58","user":"admin","app":"index","method":"GET","url":"\/index.php\/core\/preview.png?file=%2FWebDAV%2FScreen+Shot+2017-04-10+at+12.27.47.png&c=304da8e3ce62d55a4a59d994a77dec09&x=26&y=26&forceIcon=0","message":"Exception: {\"Exception\":\"GuzzleHttp\\\\Exception\\\\ServerException\",\"Message\":\"Server error response [url] http:\\\/\\\/docker.oc.solidgear.es:62546\\\/remote.php\\\/webdav\\\/\\\/Screen%20Shot%202017-04-10%20at%2012.27.47.png [status code] 500 [reason phrase] Internal Server Error\",\"Code\":500,\"Trace\":\"#0 \\\/opt\\\/owncloud\\\/lib\\\/composer\\\/guzzlehttp\\\/guzzle\\\/src\\\/Subscriber\\\/HttpError.php(32): GuzzleHttp\\\\Exception\\\\RequestException::create(Object(GuzzleHttp\\\\Message\\\\Request), Object(GuzzleHttp\\\\Message\\\\Response))\\n#1 \\\/opt\\\/owncloud\\\/lib\\\/composer\\\/guzzlehttp\\\/guzzle\\\/src\\\/Event\\\/Emitter.php(108): GuzzleHttp\\\\Subscriber\\\\HttpError->onComplete(Object(GuzzleHttp\\\\Event\\\\CompleteEvent), 'complete')\\n#2 \\\/opt\\\/owncloud\\\/lib\\\/composer\\\/guzzlehttp\\\/guzzle\\\/src\\\/RequestFsm.php(91): GuzzleHttp\\\\Event\\\\Emitter->emit('complete', Object(GuzzleHttp\\\\Event\\\\CompleteEvent))\\n#3 \\\/opt\\\/owncloud\\\/lib\\\/composer\\\/guzzlehttp\\\/guzzle\\\/src\\\/RequestFsm.php(132): GuzzleHttp\\\\RequestFsm->__invoke(Object(GuzzleHttp\\\\Transaction))\\n#4 \\\/opt\\\/owncloud\\\/lib\\\/composer\\\/react\\\/promise\\\/src\\\/FulfilledPromise.php(25): GuzzleHttp\\\\RequestFsm->GuzzleHttp\\\\{closure}(Array)\\n#5 \\\/opt\\\/owncloud\\\/lib\\\/composer\\\/guzzlehttp\\\/ringphp\\\/src\\\/Future\\\/CompletedFutureValue.php(55): React\\\\Promise\\\\FulfilledPromise->then(Object(Closure), NULL, NULL)\\n#6 \\\/opt\\\/owncloud\\\/lib\\\/composer\\\/guzzlehttp\\\/guzzle\\\/src\\\/Message\\\/FutureResponse.php(43): GuzzleHttp\\\\Ring\\\\Future\\\\CompletedFutureValue->then(Object(Closure), NULL, NULL)\\n#7 \\\/opt\\\/owncloud\\\/lib\\\/composer\\\/guzzlehttp\\\/guzzle\\\/src\\\/RequestFsm.php(134): GuzzleHttp\\\\Message\\\\FutureResponse::proxy(Object(GuzzleHttp\\\\Ring\\\\Future\\\\CompletedFutureArray), Object(Closure))\\n#8 \\\/opt\\\/owncloud\\\/lib\\\/composer\\\/guzzlehttp\\\/guzzle\\\/src\\\/Client.php(165): GuzzleHttp\\\\RequestFsm->__invoke(Object(GuzzleHttp\\\\Transaction))\\n#9 \\\/opt\\\/owncloud\\\/lib\\\/composer\\\/guzzlehttp\\\/guzzle\\\/src\\\/Client.php(125): GuzzleHttp\\\\Client->send(Object(GuzzleHttp\\\\Message\\\\Request))\\n#10 \\\/opt\\\/owncloud\\\/lib\\\/private\\\/Http\\\/Client\\\/Client.php(136): GuzzleHttp\\\\Client->get('http:\\\/\\\/docker.o...', Array)\\n#11 \\\/opt\\\/owncloud\\\/lib\\\/private\\\/Files\\\/Storage\\\/DAV.php(350): OC\\\\Http\\\\Client\\\\Client->get('http:\\\/\\\/docker.o...', Array)\\n#12 \\\/opt\\\/owncloud\\\/lib\\\/private\\\/Files\\\/Storage\\\/Wrapper\\\/Wrapper.php(294): OC\\\\Files\\\\Storage\\\\DAV->fopen('Screen Shot 201...', 'r')\\n#13 \\\/opt\\\/owncloud\\\/lib\\\/private\\\/Files\\\/Storage\\\/Wrapper\\\/PermissionsMask.php(117): OC\\\\Files\\\\Storage\\\\Wrapper\\\\Wrapper->fopen('Screen Shot 201...', 'r')\\n#14 \\\/opt\\\/owncloud\\\/lib\\\/private\\\/Files\\\/Storage\\\/Wrapper\\\/Wrapper.php(294): OC\\\\Files\\\\Storage\\\\Wrapper\\\\PermissionsMask->fopen('Screen Shot 201...', 'r')\\n#15 \\\/opt\\\/owncloud\\\/lib\\\/private\\\/Files\\\/Storage\\\/Wrapper\\\/Availability.php(317): OC\\\\Files\\\\Storage\\\\Wrapper\\\\Wrapper->fopen('Screen Shot 201...', 'r')\\n#16 \\\/opt\\\/owncloud\\\/lib\\\/private\\\/Files\\\/Storage\\\/Wrapper\\\/Encryption.php(848): OC\\\\Files\\\\Storage\\\\Wrapper\\\\Availability->fopen('Screen Shot 201...', 'r')\\n#17 \\\/opt\\\/owncloud\\\/lib\\\/private\\\/Files\\\/Storage\\\/Wrapper\\\/Encryption.php(917): OC\\\\Files\\\\Storage\\\\Wrapper\\\\Encryption->readFirstBlock('Screen Shot 201...')\\n#18 \\\/opt\\\/owncloud\\\/lib\\\/private\\\/Files\\\/Storage\\\/Wrapper\\\/Encryption.php(378): OC\\\\Files\\\\Storage\\\\Wrapper\\\\Encryption->getHeader('Screen Shot 201...')\\n#19 \\\/opt\\\/owncloud\\\/lib\\\/private\\\/Files\\\/Storage\\\/Wrapper\\\/Checksum.php(59): OC\\\\Files\\\\Storage\\\\Wrapper\\\\Encryption->fopen('Screen Shot 201...', 'r')\\n#20 \\\/opt\\\/owncloud\\\/lib\\\/private\\\/Files\\\/Storage\\\/Wrapper\\\/Wrapper.php(294): OC\\\\Files\\\\Storage\\\\Wrapper\\\\Checksum->fopen('Screen Shot 201...', 'r')\\n#21 \\\/opt\\\/owncloud\\\/lib\\\/private\\\/Files\\\/View.php(1121): OC\\\\Files\\\\Storage\\\\Wrapper\\\\Wrapper->fopen('Screen Shot 201...', 'r')\\n#22 \\\/opt\\\/owncloud\\\/lib\\\/private\\\/Files\\\/View.php(966): OC\\\\Files\\\\View->basicOperation('fopen', '\\\/WebDAV\\\/Screen ...', Array, 'r')\\n#23 \\\/opt\\\/owncloud\\\/lib\\\/private\\\/Files\\\/View.php(977): OC\\\\Files\\\\View->fopen('\\\/WebDAV\\\/Screen ...', 'r')\\n#24 \\\/opt\\\/owncloud\\\/lib\\\/private\\\/Preview\\\/Image.php(52): OC\\\\Files\\\\View->toTmpFile('\\\/WebDAV\\\/Screen ...')\\n#25 \\\/opt\\\/owncloud\\\/lib\\\/private\\\/Preview.php(1141): OC\\\\Preview\\\\Image->getThumbnail('\\\/WebDAV\\\/Screen ...', 2048, 2048, false, Object(OC\\\\Files\\\\View))\\n#26 \\\/opt\\\/owncloud\\\/lib\\\/private\\\/Preview.php(776): OC\\\\Preview->generatePreview(29)\\n#27 \\\/opt\\\/owncloud\\\/lib\\\/private\\\/Preview.php(801): OC\\\\Preview->getPreview()\\n#28 \\\/opt\\\/owncloud\\\/core\\\/ajax\\\/preview.php(63): OC\\\\Preview->showPreview()\\n#29 \\\/opt\\\/owncloud\\\/lib\\\/private\\\/Route\\\/Route.php(155) : runtime-created function(1): require_once('\\\/opt\\\/owncloud\\\/c...')\\n#30 [internal function]: __lambda_func()\\n#31 \\\/opt\\\/owncloud\\\/lib\\\/private\\\/Route\\\/Router.php(299): call_user_func('\\\\x00lambda_296', Array)\\n#32 \\\/opt\\\/owncloud\\\/lib\\\/base.php(910): OC\\\\Route\\\\Router->match('\\\/core\\\/preview.p...')\\n#33 \\\/opt\\\/owncloud\\\/index.php(49): OC::handleRequest()\\n#34 {main}\",\"File\":\"\\\/opt\\\/owncloud\\\/lib\\\/composer\\\/guzzlehttp\\\/guzzle\\\/src\\\/Exception\\\/RequestException.php\",\"Line\":89}"}

Should be merge this PR and open a new issue? @PVince81

@PVince81
Copy link
Contributor Author

is that issue related to this PR at all ? or does it happen on master / RC1 ?

Copy link
Member

@IljaN IljaN left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@davitol
Copy link
Contributor

davitol commented Apr 20, 2017

is that issue related to this PR at all ? or does it happen on master / RC1 ?

It appears in RC1 too, so I feel fine merging this PR

@PVince81
Copy link
Contributor Author

rebased for CI

@PVince81 PVince81 force-pushed the checksums-upload-extstorage branch from 57b5a77 to 2ddd4c9 Compare April 20, 2017 07:39
@PVince81 PVince81 merged commit b0fa71d into master Apr 20, 2017
@PVince81 PVince81 deleted the checksums-upload-extstorage branch April 20, 2017 10:29
@lock
Copy link

lock bot commented Aug 3, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Aug 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot upload a file to an external Storage via Desktop Client
3 participants