Merge pull request #12262 from owncloud/removeAbsoluteDirectoryPathFromTemplate
Don't disclose relative directory path for single shared files of user
This commit is contained in:
commit
6fb2477fb7
|
@ -23,7 +23,6 @@ use OCP\AppFramework\Controller;
|
|||
use OCP\IRequest;
|
||||
use OCP\AppFramework\Http\TemplateResponse;
|
||||
use OCP\AppFramework\Http\RedirectResponse;
|
||||
use OCP\AppFramework\IApi;
|
||||
use OC\URLGenerator;
|
||||
use OC\AppConfig;
|
||||
use OCP\ILogger;
|
||||
|
@ -159,7 +158,6 @@ class ShareController extends Controller {
|
|||
$originalSharePath .= $path;
|
||||
}
|
||||
|
||||
$dir = dirname($originalSharePath);
|
||||
$file = basename($originalSharePath);
|
||||
|
||||
$shareTmpl = array();
|
||||
|
@ -171,7 +169,7 @@ class ShareController extends Controller {
|
|||
$shareTmpl['sharingToken'] = $token;
|
||||
$shareTmpl['server2serversharing'] = Helper::isOutgoingServer2serverShareEnabled();
|
||||
$shareTmpl['protected'] = isset($linkItem['share_with']) ? 'true' : 'false';
|
||||
$shareTmpl['dir'] = $dir;
|
||||
$shareTmpl['dir'] = '';
|
||||
$shareTmpl['fileSize'] = \OCP\Util::humanFileSize(\OC\Files\Filesystem::filesize($originalSharePath));
|
||||
|
||||
// Show file list
|
||||
|
|
|
@ -12,6 +12,6 @@
|
|||
|
||||
$urlGenerator = new \OC\URLGenerator(\OC::$server->getConfig());
|
||||
$token = isset($_GET['t']) ? $_GET['t'] : '';
|
||||
$route = isset($_GET['download']) ? 'files_sharing.sharecontroller.downloadshare' : 'files_sharing.sharecontroller.showshare';
|
||||
$route = isset($_GET['download']) ? 'files_sharing.sharecontroller.downloadShare' : 'files_sharing.sharecontroller.showShare';
|
||||
|
||||
OC_Response::redirect($urlGenerator->linkToRoute($route, array('token' => $token)));
|
||||
|
|
|
@ -153,7 +153,7 @@ class ShareControllerTest extends \PHPUnit_Framework_TestCase {
|
|||
'sharingToken' => $this->token,
|
||||
'server2serversharing' => true,
|
||||
'protected' => 'true',
|
||||
'dir' => '/',
|
||||
'dir' => '',
|
||||
'downloadURL' => null,
|
||||
'fileSize' => '33 B'
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue