[Flow] Policy.yaml and Allowed memory size exhausted

Aljoscha Weber aweber at w-commerce.de
Thu Mar 13 17:02:04 CET 2014


Hey Adrian,

I use it in this context: 

    /**
     * @var \TYPO3\Flow\Security\AccountFactory
     * @Flow\Inject
     */
    protected $accountFactory;

   $role = array('Vendor.Package:User'); 

   $account = $this->accountFactory->createAccountWithPassword($username, $password, $role);

The memory exhausts at different lines and in different files. First call after flushing the cache crashes at a different line then the following calls.

I also encountered a strange behavior: When I only use the built-in Anonymous role, it also runs oom-fatal error  after  a successful login! 

"Likewise, the magic role Anonymous is added to the security context if a user is not authenticated."

It also doesn't crash if I only include controllers which are not called/used in the methods & acls.

The cli-memory-limit and the apache2 memory-limit is 256M. I also tried to raise both, but it didn't change the behavior. 

Thanks and best regards,
Aljoscha 

-----Ursprüngliche Nachricht-----
Von: flow-bounces at lists.typo3.org [mailto:flow-bounces at lists.typo3.org] Im Auftrag von Adrian Föder
Gesendet: Mittwoch, 12. März 2014 17:06
An: flow at lists.typo3.org
Betreff: Re: [Flow] Policy.yaml and Allowed memory size exhausted

Hi Aljoscha,

the Policy.yaml looks fine, however  "$role = array('Vendor.Package:User');" seems a bit strange to me; where do you use that construct?
And, could you tell us where in the PolicyService (in which line) the memory exhausts?

Thx and best,
adrian

Am 12.03.2014 16:57, schrieb Aljoscha Weber:
> Hello,
>
> the policy.yaml gives me a headache.
> Before the login everything works like a charm, but after the login I 
> always get this fatal error:
>
> “Allowed memory size of x bytes exhausted (tried to allocate x bytes) in /var/www/Data/Temporary/Development/SubContextDev/Cache/Code/Flow_Object_Classes/TYPO3_Flow_Security_Policy_PolicyService.php”
>
> The memory size of the server is big enough and everything works fine without a package-policy.yaml.
> I also tried to use the built-in “AuthenticatedUser”-Role but I also ran into the same fatal error.
> Is there something wrong with the policy-file or am I missing something?
>
> Any suggestion and help is welcome.
>
> Greetings,
> Aljoscha
>
> Role in the Package:
> "$role = array('Vendor.Package:User');"
>
> Policy.yaml in Vendor.Package:
>
> roles:
>    User: []
>
> resources:
>    methods:
>      someMethods: 'method(Vendor\Package\Controller\SomeNameController->.*())'
>      someOtherMethods: 'method(Vendor\Package\Controller\SomeOtherNameController->.*())'
>
> acls:
>    User:
>      methods:
>        someMethods: GRANT
>        someOtherMethods: GRANT
>    Anonymous:
>      methods:
>       someMethods: DENY
>       someOtherMethods: GRANT
>
>
>

_______________________________________________
Flow mailing list
Flow at lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/flow


More information about the Flow mailing list