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

Make sure we only require what is allowed #42

Merged
merged 1 commit into from
Oct 21, 2016

Conversation

nickvergessen
Copy link
Member

Signed-off-by: Joas Schilling <coding@schilljs.com>
@MorrisJobke
Copy link
Member

@nickvergessen How to reproduce this?

@nickvergessen
Copy link
Member Author

As mentioned in the issue, I have no idea. I just know it works.
Theory casing:

/**
* get a cache instance for the storage
*
* @param string $path
* @param \OC\Files\Storage\Storage (optional) the storage to pass to the cache
* @return \OC\Files\Cache\Cache
*/
public function getCache($path = '', $storage = null) {
if (!$storage) {
$storage = $this;
}
$cache = $this->storage->getCache($path, $storage);
return new CacheWrapper($cache, $storage, $this->operation);
}

untyped storage get's injected into the method, and therefor may not be $this but any storage. so I used the most basic public interface to be sure.

@nickvergessen
Copy link
Member Author

Merging as a second user reports the same issue and says this fixes it.

@nickvergessen nickvergessen merged commit 8690ceb into master Oct 21, 2016
@nickvergessen nickvergessen deleted the server-1708-cachewrapper-failure branch October 21, 2016 13:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants