ContainerConfig.php regex parses out valid parts of container.js, throws
"Failed to json_decode the container configuration"
----------------------------------------------------------------------------------------------------------------------------
Key: SHINDIG-1063
URL: https://issues.apache.org/jira/browse/SHINDIG-1063
Project: Shindig
Issue Type: Bug
Components: PHP
Reporter: Arne Roomann-Kurrik
The following line in /php/src/gadgets/ContainerConfig.php:
$contents = preg_replace('/[^http:\/\/|^https:\/\/]\/\/.*$/m', '',
preg_replace('@/\\*(?:.|[\\n\\r])*?\\*/@', '', $contents));
attemps to parse comments out of container.js. However, container.js ships
with a default setting of:
"gadgets.oauthGadgetCallbackTemplate" : "//%host%/gadgets/oauthcallback",
When run through the preg_replace lines above, this line is converted to:
"gadgets.oauthGadgetCallbackTemplate" :
which then breaks PHP's ability to parse container.js as a valid json string
and throws a "Failed to json_decode the container configuration" exception.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.