Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Releases and Announcements /

Latest news about the SilverStripe software.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

SecureFiles 0.30 Released


Reply


17 Posts   4368 Views

Avatar
klikhier

Community Member, 150 Posts

24 August 2010 at 8:05am

FYI have not found solution to my problem (but haven't much looked into it either). Looks like I'm gonna need this module for a project in the upcoming months, so any help is appreciated :)

Avatar
Hamish

Community Member, 712 Posts

24 August 2010 at 8:35am

Hey Aram,

Ok, the options directive isn't required and it looks like it might cause issues with some setups. I'll amend the documentation.

In the meantime, could you turn rewrite debugging on and post the apache log for a request to a secure file?

It sounds like this might be related to shared hosts, or perhaps file permissions, but I have not been able to replicate the issue. I will be on IRc in a few mins if you can hang around.

Avatar
Carbon Crayon

Community Member, 598 Posts

24 August 2010 at 9:27am

Hi Hamish,

here is what was output in the rewritelog:

92.234.29.107 - - [23/Aug/2010:22:19:43 +0100] [sfx.aabweb.co.uk/sid#82815a0][rid#84dea88/initial] (3) [perdir /home/aabweb/public_html/sfx/] strip per-dir prefix: /home/aabweb/public_html/sfx/assets/Uploads/SSBauthor.jpg -> assets/Uploads/SSBauthor.jpg
92.234.29.107 - - [23/Aug/2010:22:19:43 +0100] [sfx.aabweb.co.uk/sid#82815a0][rid#84dea88/initial] (3) [perdir /home/aabweb/public_html/sfx/] applying pattern '.*' to uri 'assets/Uploads/SSBauthor.jpg'
92.234.29.107 - - [23/Aug/2010:22:19:43 +0100] [sfx.aabweb.co.uk/sid#82815a0][rid#84dea88/initial] (1) [perdir /home/aabweb/public_html/sfx/] pass through /home/aabweb/public_html/sfx/assets/Uploads/SSBauthor.jpg

is that helpful?

As with the other guys when I switch it to SS send file it all starts working....albeit downloading files instead of opening them in hte browser...what are the downsides to using this method? I know it says dev only, but it seems to work ok...?

Thanks for your help, it's a great module! :)

Avatar
Hamish

Community Member, 712 Posts

24 August 2010 at 11:56am

Hey everyone, Aram and I got to the source of the issue - some hosts will not buffer the file output, causing errors when flush calls were made. Trunk has been updated with a fix.

Avatar
klikhier

Community Member, 150 Posts

24 August 2010 at 4:31pm

Thanks guys!!!

Avatar
dendeffe

Community Member, 135 Posts

31 August 2010 at 1:28am

Great timing. I was just having the same problem.

Avatar
Cynic

Community Member, 3 Posts

10 September 2010 at 1:18pm

I can install SecureFiles on my Silverstripe instance and perform build/flush OK, but when I try and uncomment either (or both) of the additional permissions modes in _config.php, I see the following error when trying to access /admin/assets:

[User Error] Uncaught Exception: Object->__call(): the method 'memberpermissions' does not exist on 'Folder'
GET /cms/admin/assets/

This also occurs in SecureFiles 0.21.

I'm using Silverstripe 2.3.2, with .htaccess and rewrite, as per recommendations in the README.

I haven't seen any other reference to this so I assume it's something I'm doing wrong, or something wrong with my File/Folder classes, but can anyone offer any tips?

Full error output and trace:
---

Line 515 in /home/saanz/public_html/cms/sapphire/core/Object.php

Source

506             case isset($config['function']) :
507                return $config['function']($this, $arguments);
508             
509             default :
510                throw new Exception (
511                   "Object->__call(): extra method $method is invalid on $this->class:" . var_export($config, true)
512                );
513          }
514       } else {
515          throw new Exception("Object->__call(): the method '$method' does not exist on '$this->class'");
516       }
517    }
518    
519    // -----------------------------------------------------------------------------------------------------------------
520    
521    /**

Trace

Object->__call(GroupPermissions,Array)
Folder->GroupPermissions()
Line 36 of SecureFileGroupPermissionDecorator.php
SecureFileGroupPermissionDecorator->AllGroupPermissions()
call_user_func_array(Array,Array)
Line 489 of Object.php
Object->__call(AllGroupPermissions,Array)
Folder->AllGroupPermissions()
Line 26 of SecureFileGroupPermissionDecorator.php
SecureFileGroupPermissionDecorator->canViewSecured(Member,,,,,,)
Line 741 of Object.php
Object->extend(canViewSecured,Member)
Line 43 of SecureFileDecorator.php
SecureFileDecorator->canView(Member,,,,,,)
Line 741 of Object.php
Object->extend(canView,Member)
Line 124 of File.php
File->canView()
Line 923 of LeftAndMain.php
LeftAndMain->EditForm()
call_user_func_array(Array,Array)
Line 550 of ViewableData.php
ViewableData->cachedCall(EditForm,,)
Line 1002 of ViewableData.php
ViewableData_Customised->cachedCall(EditForm,,)
Line 591 of ViewableData.php
ViewableData->hasValue(EditForm)
Line 29 of .cache.home.saanz.public_html.cms.cms.templates.Includes.AssetAdmin_right.ss
include(/tmp/silverstripe-cache-home-saanz-public_html-cms/.cache.home.saanz.public_html.cms.cms.templates.Includes.AssetAdmin_right.ss)
Line 354 of SSViewer.php
SSViewer->process(ViewableData_Customised)
Line 773 of ViewableData.php
ViewableData->renderWith(Array)
Line 484 of LeftAndMain.php
LeftAndMain->Right()
call_user_func_array(Array,Array)
Line 408 of ViewableData.php
ViewableData->XML_val(Right,,1)
Line 983 of ViewableData.php
ViewableData_Customised->XML_val(Right,,1)
Line 71 of .cache.home.saanz.public_html.cms.cms.templates.LeftAndMain.ss
include(/tmp/silverstripe-cache-home-saanz-public_html-cms/.cache.home.saanz.public_html.cms.cms.templates.LeftAndMain.ss)
Line 354 of SSViewer.php
SSViewer->process(ViewableData_Customised)
Line 166 of Controller.php
Controller->handleAction(HTTPRequest)
Line 129 of RequestHandler.php
RequestHandler->handleRequest(HTTPRequest)
Line 122 of Controller.php
Controller->handleRequest(HTTPRequest)
Line 277 of Director.php
Director::handleRequest(HTTPRequest,Session)
Line 121 of Director.php
Director::direct(/admin/assets/)
Line 118 of main.php

Avatar
Hamish

Community Member, 712 Posts

10 September 2010 at 5:32pm

Don't forget to do a database refresh after changing the config (dev/build or db/build).