You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Example / Description:
Set any group at the root of a private storage. All files indexed with solrfal will get this group in the core field "access". So a user might get shown more search results as he should see. Clicking on some of the result-links will result in "No access" message of fal_securedownload. Furtermore the user could see secret informations in the prview of the search result.
Reason:
\BeechIt\FalSecuredownload\Aspects\SolrFalAspect::class contains the folloing line:
foreach ($this->getFolderRootLine($resource->getParentFolder()) as $folder)
The array contains the rootline from the root of the storage down to the ressource.
But it should be examined in the reverse order. This is because "The deeper the folder structure, the more restrictive the permissions". And the most restrictive permission from the view of the ressource should match.
So an arry_reverse() would help.
This should be sure because the method is only called from:
Aspects/SolrFalAspect.php line 52
Hooks/KeSearchFilesHook.php lines 77 and 102
But there is another method, also calling getFolderRootLine().
Here it could be wrong too because it also makes a break at the first match. Not checked it till now!
In case it's also wrong it would surely be better to remove the array_reverse() at the return statement of getFolderRootLine()?
* Update CheckPermissions.php
* Get FeGroups that are allowed to view a file/folder (checks NOT full rootline)
* Check from the given folder up to root, i. e. the reverse! rootline.
* First restriction matches.
*
* This Bugfix should be sure because it's only called from:
* - Aspects/SolrFalAspect.php
* - Hooks/KeSearchFilesHook.php
*
* This Bugfix resolvees issues:
* - #161
* - #166
Example / Description:
Set any group at the root of a private storage. All files indexed with solrfal will get this group in the core field "access". So a user might get shown more search results as he should see. Clicking on some of the result-links will result in "No access" message of fal_securedownload. Furtermore the user could see secret informations in the prview of the search result.
Reason:
\BeechIt\FalSecuredownload\Aspects\SolrFalAspect::class contains the folloing line:
In getPermissions is the following loop:
The array contains the rootline from the root of the storage down to the ressource.
But it should be examined in the reverse order. This is because "The deeper the folder structure, the more restrictive the permissions". And the most restrictive permission from the view of the ressource should match.
So an arry_reverse() would help.
This should be sure because the method is only called from:
But there is another method, also calling getFolderRootLine().
Here it could be wrong too because it also makes a break at the first match. Not checked it till now!
In case it's also wrong it would surely be better to remove the array_reverse() at the return statement of getFolderRootLine()?
This issue should also solve issue #161
The text was updated successfully, but these errors were encountered: