Bug #36056

Usage of " in the Policy.yaml

Added by Patrick Kollodzik over 9 years ago. Updated over 8 years ago.

Status:
Resolved
Priority:
Should have
Category:
Security
Start date:
2012-04-14
Due date:
% Done:

100%

Estimated time:
PHP Version:
Has patch:
No
Complexity:

Description

The Policy.yaml that comes with TYPO3.FLOW3 has the following example:

# resources:
#   methods:
#     TYPO3_FooPackage_PropertySetter: "method(TYPO3\FooPackage\SomeClass->setSomeProperty())" 

If you follow that example and wrap the string with the " character, then the following expression will fail:

# resources:
#   methods:
#     ResourceName: "method(Package\LoginController\SomeClass->setSomeProperty())" 

Because of the " the \L will be removed and the expression will not work as expected. If you replace the " with ' it will work.

The examples in the documentation use all the ' character, so it should be enough to change the Policy.yaml that comes with TYPO3.FLOW3. It seems it is a legal escape character for YAML, but it is a bit confusing.

The stripping happens in the YAML paser and not in FLOW3.

http://www.yaml.org/refcard.html

Also available in: Atom PDF